When a module contains a deeply nested grouping (approximately 6 levels) that is expanded via uses, and a leaf within that expanded grouping has a leafref whose path points to a target that does not exist, a segmentation fault occurs during compilation.
Specifically, the crash happens when explicit compile is enabled (LY_CTX_EXPLICIT_COMPILE / compile = TRUE) and the module is compiled after loading. Instead of returning a proper validation error (e.g., "leafref target not found"), libyang crashes with a segmentation fault.
When a module contains a deeply nested grouping (approximately 6 levels) that is expanded via
uses, and a leaf within that expanded grouping has aleafrefwhosepathpoints to a target that does not exist, a segmentation fault occurs during compilation.Specifically, the crash happens when explicit compile is enabled (
LY_CTX_EXPLICIT_COMPILE/compile = TRUE) and the module is compiled after loading. Instead of returning a proper validation error (e.g., "leafref target not found"), libyang crashes with a segmentation fault.