2013-04-05 :-(
_ [cppcheck]NetBSD src に cppcheck を仕掛けておいたら死んでいた
zsh: segmentation fault cppcheck --enable=all /usr/src/external/gpl3/gdb/dist/gdb/p-valprint.c
cygwin で試してみたら再現した。
% cppcheck --version Cppcheck 1.58
% cd gdb-7.5.1/gdb % cppcheck --enable=all p-valprint.c Checking p-valprint.c... [p-valprint.c]: (information) Too many #ifdef configurations - cppcheck only checks 12 of 21 configurations. Use --force to check all configurations. [p-valprint.c:547]: (style) The scope of the variable 'i' can be reduced. [p-valprint.c:642]: (style) The scope of the variable 'v' can be reduced. [p-valprint.c:216]: (style) Variable 'i' is assigned a value that is never used. zsh: segmentation fault (core dumped) cppcheck --enable=all p-valprint.c
cygwin に cppcheck 1.59 があった( 最新も 1.59 )のでアップデートして再度実行したら正常終了した。
ふむ
% cppcheck --version Cppcheck 1.59
% cppcheck --enable=all p-valprint.c Checking p-valprint.c... [p-valprint.c]: (information) Too many #ifdef configurations - cppcheck only checks 12 of 21 configurations. Use --force to check all configurations. [p-valprint.c:547]: (style) The scope of the variable 'i' can be reduced. [p-valprint.c:642]: (style) The scope of the variable 'v' can be reduced. [p-valprint.c:801]: (style) Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. Checking p-valprint.c: BFD64... Checking p-valprint.c: BFD_HOST_64_BIT... Checking p-valprint.c: CC_HAS_LONG_LONG... Checking p-valprint.c: CHAR_BIT... Checking p-valprint.c: FOPEN_RB... Checking p-valprint.c: GDBSERVER... Checking p-valprint.c: GDB_NM_FILE... Checking p-valprint.c: HAVE_ALLOCA_H... Checking p-valprint.c: HAVE_BTOWC;HAVE_ICONV;HAVE_WCHAR_H... Checking p-valprint.c: HAVE_BTOWC;HAVE_WCHAR_H... Checking p-valprint.c: HAVE_ICONV... Checking usage of global functions.. [p-valprint.c:916]: (style) The function '_initialize_pascal_valprint' is never used. [p-valprint.c:60]: (style) The function 'pascal_val_print' is never used. [p-valprint.c:427]: (style) The function 'pascal_value_print' is never used. (information) Cppcheck cannot find all the include files (use --check-config for details)