0

我正在使用 LeakSanitizer ( https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer )

我正在尝试存储在运行可执行文件结束时生成的 LeakSanitizer 内存泄漏报告,但似乎用户无法将其重定向到文本文件?我的 gcc 版本是 6.3.0

gcc -fsanitize=leak -g example.c -o leakexec.out
env LSAN_OPTIONS=detect_leaks=1 ./leakexec.out > output.txt

cat output.txt // results in empty text file even though the leaks were outputted on the terminal window?

gcc6.3.0似乎也没有log_path,那么还有其他方法可以获取报告输出吗?

4

0 回答 0