Skip to content

Segmentation fault (core dumped) when path of leafref doesn't exist #2546

Description

@hansammy-suh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions