Skip to content

Stack overflow when grouping uses itself #531

@dreamesee

Description

@dreamesee

The following incorrect yang file (because a grouping certainly does not need to use itself):

module any_mod_name {
  namespace "any_mod_name";
  prefix "any_mod_name";
  grouping stuff-top {
    uses stuff-top;
  }
}

Produces:

ASAN:DEADLYSIGNAL                                                                                                                                         
==============================                                                                                         
==23396==ERROR: AddressSanitizer: stack-overflow on address 0x7ffec18a7ff8 (pc 0x7f7b7aefcb09 bp 0x000000000002 sp 0x7ffec18a8000 T0)                     
    #0 0x7f7b7aefcb08  (/lib64/libasan.so.4+0x2bb08)                                                                                                      
    #1 0x7f7b7aef7d9b  (/lib64/libasan.so.4+0x26d9b)                                                                                                      
    #2 0x7f7b7afafa50 in __interceptor_calloc (/lib64/libasan.so.4+0xdea50)                                                                               
    #3 ...libyang/src/tree_schema.c:2738  
    #4 ...libyang/src/tree_schema.c:2890  
    #5 ...libyang/src/tree_schema.c:2890  
    #6 ...libyang/src/tree_schema.c:2890  
    #7 ...libyang/src/tree_schema.c:2890  
    ...
    #250 ...libyang/src/tree_schema.c:2890
                                                                                                                                                          
SUMMARY: AddressSanitizer: stack-overflow (/lib64/libasan.so.4+0x2bb08)                                                                                   
==23396==ABORTING`

We are compiling and executing with C++ sanitizer ASAN, libyang-0.14.50-0.x86_64.rpm.

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