C/C++ã§ããã°ã©ã ãæ¸ãã¦ããã¨ãã«ééããåä»ãªãã°ã®ä¸ã¤ãã¡ã¢ãªãªã¼ã¯ã§ãã ä»åã¯ã¡ã¢ãªãªã¼ã¯ãæ¤åºããã®ã«ä½¿ãããã¼ã«ã®ä½¿ãæ¹ã«ã¤ãã¦æ¸ãã¾ãã AddressSanitizer ã³ã³ãã¤ã«ãªãã·ã§ã³ãã¤ããã ãã§ä½¿ãã¦åºåãè¦ãããã®ã§ããããã§ãã AddressSanitizerã¯GCC 4.8以éãLLVM 3.1以éã§ä½¿ããã¨ãã§ãã¾ãã ã³ã³ãã¤ã«æã«ãªãã·ã§ã³ãã¤ããã ãã§ã¡ã¢ãªãªã¼ã¯ãæ¤åºãã¦ããã¾ããï¼è¥å¹²å®è¡æéãé·ããªãã¾ãï¼ ä»¥ä¸ã®ã¡ã¢ãªãªã¼ã¯ã®ããããã°ã©ã leak.cpp ãä¾ã«ä½¿ãæ¹ã説æãã¾ãã int main() { int *a = new int[10]; } newã§ä½ã£ãåçé åãdeleteãã¦ããªãã®ã§ã¡ã¢ãªãªã¼ã¯ã«ãªãã¾ãã g++ -fsanitize=address -fno-omit-frame-pointer -g l
{{#tags}}- {{label}}
{{/tags}}