-
Notifications
You must be signed in to change notification settings - Fork 482
Detecting memory leaks
Yulei Sui edited this page Apr 16, 2020
·
22 revisions
Please refer to SVF setup
clang -c -emit-llvm -g example.c -o example.bc
To compile a complicated real-world project you may wish to use WLLVM guide to install it.
Compile your example.c into an executable and extract it into example.bc
wllvm example.c
extract example
cd SVF
. ./setup
saber -leak -stat=false example.bc
4. The printed memory leak results when analyzing this test case
PartialLeak : memory allocation at : (ln: 23 fl: sp1.c)
conditional free path:
--> (ln: 12 fl: sp1.c)