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

saber -leak memory report problem #1632

Open
jiejiaodedengdai opened this issue Jan 16, 2025 · 1 comment
Open

saber -leak memory report problem #1632

jiejiaodedengdai opened this issue Jan 16, 2025 · 1 comment

Comments

@jiejiaodedengdai
Copy link

jiejiaodedengdai commented Jan 16, 2025

我刚开始使用SVF里面的saber工具 用以测试juliet数据集其中的代码 采用如下命令 clang -O0 -g -emit-llvm -c CWE401_Memory_Leak__char_calloc_01.c -o 2.bc -I "/home/jiejie/Desktop/juliet/C/testcasesupport" 得到2.bc文件后 我发现用saber工具测试并未得到报错

Image
Image

当我修改源代码CWE401_Memory_Leak__char_calloc_01.c 这个文件的库但不改变代码逻辑时却可以的到报错
如下命令 clang -O0 -g -emit-llvm -c CWE401_Memory_Leak__char_calloc_01._change.c -o 2.bc

用saber工具测试如下
Image

下面的两份代码 其中一份需要juliet里面的库 另一份不需要
CWE401_Memory_Leak__char_calloc_01.zip

请问一下这个差异出现的原因是什么? 我该怎么测试

@jiejiaodedengdai jiejiaodedengdai changed the title 内存泄漏报告问题 saber -leak memory report problem Jan 16, 2025
@jiejiaodedengdai
Copy link
Author

已解决 采用clang -S -g -D INCLUDEMAIN -emit-llvm -O0 CWE401_Memory_Leak__char_calloc_01.c -o 11.bc -I/home/jiejie/Desktop/juliet/C/testcasesupport -DOMITGOOD 命令即可 saber需要main函数作为入口

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

1 participant