Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

stack smashing detected in clang-extdef-mapping #705

Closed martong closed 5 years ago

martong commented 5 years ago

Repro: analyze latest upstream libcxx with latest upstream Clang with CTU.

warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
*** stack smashing detected ***: /home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/clang-extdef-mapping terminated
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libLLVMSupport.so.10svn(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2a)[0x7f45a43c626a]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libLLVMSupport.so.10svn(_ZN4llvm3sys17RunSignalHandlersEv+0x4c)[0x7f45a43c3dbc]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libLLVMSupport.so.10svn(+0x190f29)[0x7f45a43c3f29]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f45a2c464b0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f45a2c46428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f45a2c4802a]
/lib/x86_64-linux-gnu/libc.so.6(+0x777ea)[0x7f45a2c887ea]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f45a2d2a15c]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7f45a2d2a100]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libclangTooling.so.10svn(+0x5f989)[0x7f45a33ef989]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libclangTooling.so.10svn(_ZN5clang7tooling14ToolInvocation13runInvocationEPKcPNS_6driver11CompilationESt10shared_ptrINS_18CompilerInvocationEES7_INS_22PCHContainerOperationsEE+0x9f)[0x7f45a33e759f]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libclangTooling.so.10svn(_ZN5clang7tooling14ToolInvocation3runEv+0x10da)[0x7f45a33ec58a]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/../lib/libclangTooling.so.10svn(_ZN5clang7tooling9ClangTool3runEPNS0_10ToolActionE+0xcef)[0x7f45a33ee0df]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/clang-extdef-mapping[0x40292c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f45a2c31830]
/home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/clang-extdef-mapping[0x402ac9]
Stack dump:
0.      Program arguments: /home/egbomrt/WORK/llvm5/build/release_assert.gcc/bin/clang-extdef-mapping /home/egbomrt/WORK/llvm4/git/llvm-project/libcxxabi/src/cxa_vector.cpp -- --target=x86_64-linux-gnu -nobuiltininc -isystem /home/egbomrt/WORK/llvm5/build/release_assert.gcc/lib/clang/10.0.0/include -isystem /usr/include/c++/5 -isystem /usr/include/x86_64-linux-gnu/c++/5 -isystem /usr/include/c++/5/backward -isystem /usr/local/include -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include -c -x c++ -DHAVE___CXA_THREAD_ATEXIT_IMPL -D_DEBUG -D_GNU_SOURCE -D_LIBCPP_DISABLE_EXTERN_TEMPLATE -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_LIBCXXABI_BUILDING_LIBRARY -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dcxxabi_shared_EXPORTS -I/home/egbomrt/WORK/llvm4/build/release_assert.gcc/projects/libcxxabi/src -I/home/egbomrt/WORK/llvm4/git/llvm-project/libcxxabi/src -I/usr/include/libxml2 -I/home/egbomrt/WORK/llvm4/build/release_assert.gcc/include -I/home/egbomrt/WORK/llvm4/git/llvm-project/llvm/include -I/home/egbomrt/WORK/llvm4/git/llvm-project/libcxxabi/include -I/home/egbomrt/WORK/llvm4/git/llvm-project/libcxx/include -fPIC -fvisibility-inlines-hidden -std=c++14 -Wno-unused-parameter -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -fPIC -UNDEBUG -nostdinc++ -Wno-error -pedantic -fstrict-aliasing -funwind-tables -D_DEBUG -UNDEBUG -std=c++11

[ERROR 2019-10-31 18:30] - Error generating function map.
martong commented 5 years ago

Older commit f8e733f (from September) does not produce the error. Might be useful for bisect?

martong commented 5 years ago

False alarm. I recompiled clang but I forgot to recompile the clang-extdef-binary.