Skip to content

null pointer for ns_set when calling lyd_parse_opaq_error #2075

@lyzliyuzhi91

Description

@lyzliyuzhi91

for (uint32_t u = ns_set->count - 1; u + 1 > 0; --u) {

#0  0x00007ffff6ed3465 in lyxml_ns_get (ns_set=0x0, prefix=0x0, prefix_len=0) at /data/lcx/opensource/libyang/src/xml.c:248
#1  0x00007ffff6e0bd9a in ly_store_prefix_data (ctx=0x7ffff0019760, value=0x7ffff0015570, value_len=0, format=LY_VALUE_XML,
    prefix_data=0x0, format_p=0x55555579fe7c, prefix_data_p=0x55555579fe80)
    at /data/lcx/opensource/libyang/src/tree_data_common.c:1393
#2  0x00007ffff6ec98c6 in lyplg_type_prefix_data_new (ctx=0x7ffff0019760, value=0x7ffff0015570, value_len=0, format=LY_VALUE_XML,
    prefix_data=0x0, format_p=0x55555579fe7c, prefix_data_p=0x55555579fe80) at /data/lcx/opensource/libyang/src/plugins_types.c:595
#3  0x00007ffff6efd700 in lyplg_type_store_union (ctx=0x7ffff0019760, type=0x7ffff068c6c0, value=0x7ffff0015570, value_len=0,
    options=0, format=LY_VALUE_XML, prefix_data=0x0, hints=64, ctx_node=0x7ffff06af9f0, storage=0x7fffffffd3f0, unres=0x0,
    err=0x7fffffffd418) at /data/lcx/opensource/libyang/src/plugins_types/union.c:342
#4  0x00007ffff6e08fce in ly_value_validate (ctx=0x7ffff0019760, node=0x7ffff06af9f0, value=0x7ffff0015570 "", value_len=0,
    format=LY_VALUE_XML, prefix_data=0x0, hints=64) at /data/lcx/opensource/libyang/src/tree_data_common.c:469
#5  0x00007ffff6e09b39 in lyd_parse_opaq_list_error (node=0x5555557d7210, snode=0x7ffff06af960)
    at /data/lcx/opensource/libyang/src/tree_data_common.c:737
#6  0x00007ffff6e0a14d in lyd_parse_opaq_error (node=0x5555557d7210) at /data/lcx/opensource/libyang/src/tree_data_common.c:829

the info of node in frame 6

$2 = {
  {
    node = {
      hash = 0,
      flags = 0,
      schema = 0x0,
      parent = 0x5555557b56a0,
      next = 0x0,
      prev = 0x5555557d7210,
      meta = 0x0,
      priv = 0x0
    },
    {
      hash = 0,
      flags = 0,
      schema = 0x0,
      parent = 0x5555557b56a0,
      next = 0x0,
      prev = 0x5555557d7210,
      meta = 0x0,
      priv = 0x0
    }
  },
  child = 0x5555557c5050,
  name = {
    name = 0x7ffff0031340 "unicast",
    prefix = 0x0,
    {
      module_ns = 0x7ffff037d670 "urn:ntp",
      module_name = 0x7ffff037d670 "urn:ntp"
    }
  },
  value = 0x7ffff0015570 "",
  hints = 64,
  format = LY_VALUE_XML,
  val_prefix_data = 0x0,
  attr = 0x0,
  ctx = 0x7ffff0019760
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugBug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions