Sanitizers for C Compilation

gcc has some useful tools to help us find bugs.
Example:

gcc -lpthread -fsanitize=thread  #check data race
gcc -fsanitize=address #check memory error

Actually, there are many other sanitiers which can be the option: image

posted on 2022-05-11 23:19  AI思  阅读(21)  评论(0)    收藏  举报