Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gcc 版本是 5.4.0
我想像这样使用它:-fsanitize=address,leak
好的?
只需将-fsanitize=addressand -fsanitize=leak(作为单独的程序参数)传递给gcc. 阅读Invoking GCC章节和Instrumentation Options章节。
-fsanitize=address
-fsanitize=leak
gcc
还可以考虑使用valgrind程序。
不要忘记用(甚至可能)编译所有代码。-Wall -Wextra -g-g3
-Wall -Wextra -g
-g3