Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault of yanglint validation with examples #21

Closed
classcwnd opened this issue Feb 9, 2016 · 0 comments
Closed

Segmentation fault of yanglint validation with examples #21

classcwnd opened this issue Feb 9, 2016 · 0 comments
Assignees

Comments

@classcwnd
Copy link

> add ietf-netconf-acm.yin
> data data-malformed-xml.xml
libyang[0]: Parser fails around the line 12.
libyang[0]: Mixed opening (nam) and closing (rule) element tags.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7dc3fd6 in lyd_validate (node=0x0, options=0)
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/tree_data.c:700
700         for (i = 0; i < ctx->models.used; i++) {
Missing separate debuginfos, use: debuginfo-install pcre-7.8-6.el6.x86_64
(gdb) bt
#0  0x00007ffff7dc3fd6 in lyd_validate (node=0x0, options=0)
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/tree_data.c:700
#1  0x00007ffff7db7a19 in lyd_parse_xml (ctx=0x60a010, root=0x7fffffffd8e0, options=0)
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/parser_xml.c:439
#2  0x00007ffff7dc26e2 in lyd_parse_ (ctx=0x60a010, parent=0x0, 
    data=0x7ffff7d88000 "<data xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n<nacm xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-acm\" xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n    <rule-list>\n      <name>almigh"..., format=LYD_XML, options=0)
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/tree_data.c:68
#3  0x00007ffff7dc28ad in lyd_parse_data_ (ctx=0x60a010, 
    data=0x7ffff7d88000 "<data xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n<nacm xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-acm\" xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n    <rule-list>\n      <name>almigh"..., format=LYD_XML, options=0, 
    ap=0x7fffffffd990) at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/tree_data.c:106
#4  0x00007ffff7dc2b89 in lyd_parse_fd (ctx=0x60a010, fd=3, format=LYD_XML, options=0)
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/tree_data.c:147
#5  0x00007ffff7dc2d44 in lyd_parse_path (ctx=0x60a010, path=0x610475 "data-malformed-xml.xml", format=LYD_XML, options=0)
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/src/tree_data.c:174
#6  0x0000000000403242 in cmd_data (arg=0x610d80 "data data-malformed-xml.xml")
    at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/tools/lint/commands.c:470
#7  0x0000000000402104 in main () at /project/swbuild82/eyyuppg/libnetconf/integration/new4/netopeer/libyang/tools/lint/main.c:91
(gdb) 
@rkrejci rkrejci self-assigned this Feb 10, 2016
rkrejci added a commit that referenced this issue Feb 10, 2016
detect error (not just empty data, real error) in XML parser and return
immediately

Fixes #21
PavolVican pushed a commit that referenced this issue Feb 21, 2016
detect error (not just empty data, real error) in XML parser and return
immediately

Fixes #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants