sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

EntityBulker SIGSEGV when create_entry attr_count 0

Open arvbb opened this issue 2 years ago • 2 comments

What I did Removed access to variable causing the segfault while create_entry with attr_count 0

Why I did it When the bulker create_entry was called with attr_count as 0, the swss log would access the attr_list and try to print the id. This was causing the orchagent crash:

Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000056230970734d in EntityBulker<_sai_nat_api_t>::create_entry (this=0x56230b31f988, object_status=0x56230b3e4a20, entry=, attr_count=0, attr_list=0x7ffcadbbbef0) at /usr/include/c++/8/bits/unordered_map.h:309

How I verified it Verified orchagent does not segfault under this condition.

Details if related

arvbb avatar Apr 05 '22 22:04 arvbb

/azp run

prsunny avatar Apr 19 '22 18:04 prsunny

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Apr 19 '22 18:04 azure-pipelines[bot]