基于异构图表征的源代码漏洞检测方法
张学军,梁书滨,白万荣,张奉鹤,黄海燕,郭梅凤,陈卓

Source code vulnerability detection method based on heterogeneous graph representation
Xuejun ZHANG,Shubin LIANG,Wanrong BAI,Fenghe ZHANG,Haiyan HUANG,Meifeng GUO,Zhuo CHEN
表 1 “操作指令”与源代码信息的对比
Tab.1 Comparison of “operation instructions” and source code
类型LLVM-IR数量源代码(举例)
算数指令add,sub…12+, −, *, /, %
位指令shl,lshr…6<<, >>, &, |, ^
转换指令trunc,zext…9char b = 97
内存指令load,store…3free *ptr
比较指令icmp,fcmp…2>, <, ==
分支指令call,ret,br…3goto label
异常处理landingpad…2std::exception
向量指令llvm.vector…3vec[3] = 5
原子指令atomicrmw…3fetch_add()
聚合指令insertvalue…4struct S{float x}
其他指令select,phi…3condition ? a : b