SVF icon indicating copy to clipboard operation
SVF copied to clipboard

assertion violation

Open Ychame opened this issue 4 years ago • 1 comments

wpa: /toshiba/ycf/SVF/include/Graphs/VFG.h:417: SVF::NodeID SVF::VFG::getDef(const SVF::PAGNode*) const: Assertion `it!=PAGNodeToDefMap.end() && "PAG node does not have a definition??"' failed.
Aborted (core dumped)

I use the latest SVF to run this bitcode. Above is the output.

assert_trigger.zip

Ychame avatar Dec 24 '20 08:12 Ychame

Just fixed https://github.com/SVF-tools/SVF/commit/18da89bf95d8d17d0dbebe00619cdb4537de42bb. The reason is that the BlockAddress instruction was not handled for arguments at an CallBrInst, e.g., i8* blockaddress(@trace_event_buffer_commit, %if.then)) as below:

  callbr void asm sideeffect "1:.byte 0x0f,0x1f,0x44,0x00,0\0A\09.pushsection __jump_table,  \22aw\22 \0A\09 .balign 8 \0A\09 .quad 1b, ${2:l}, ${0:c} + ${1:c} \0A\09.popsection \0A\09", "i,i,X,~{dirflag},~{fpsr},~{flags}"(%struct.static_key* bitcast ({ { %struct.atomic_t, { %struct.jump_entry* } } }* @tracepoint_printk_key to %struct.static_key*), i1 false, i8* blockaddress(@trace_event_buffer_commit, %if.then)) #8
          to label %static_key_false.exit.thread [label %if.then], !dbg !10157, !srcloc !1015

yuleisui avatar Dec 25 '20 10:12 yuleisui