llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.55k stars 11.8k forks source link

segfault tidy-12 #47352

Closed llvmbot closed 3 years ago

llvmbot commented 3 years ago
Bugzilla Link 48008
Resolution FIXED
Resolved on Nov 13, 2020 22:09
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @irishrover
Fixed by commit(s) https://reviews.llvm.org/rG4364539b3a4c5e73561e5ff29e6952a75e89dc43

Extended Description

Ubuntu 20.04 1:12~++20201026065856+bd07be4f3f7-1~exp1~20201026180537.203

clang-tidy-12 --version LLVM (http://llvm.org/): LLVM version 12.0.0

Optimized build. Default target: x86_64-pc-linux-gnu Host CPU: haswell

make

T++ src/lib/libndmIpSec.o (out=$(clang-tidy-12 -warnings-as-errors= -header-filter=. -checks=-,android-,-android-cloexec-pipe,bugprone-,cert-,cppcoreguidelines-,google-build-namespaces,google-readability-casting,google-runtime-memset,llvm-namespace-comment,llvm-twine-local,misc-,modernize-redundant-void-arg,modernize-use-override,perfomance-,readability-,-android-cloexec-accept,-android-cloexec-fopen,-android-cloexec-open,-bugprone-branch-clone,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-parent-virtual-call,-bugprone-reserved-identifier,-bugprone-suspicious-missing-comma,-cert-dcl37-c,-cert-dcl21-cpp,-cert-dcl50-cpp,-cert-dcl51-cpp,-cert-dcl59-cpp,-cert-oop54-cpp,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-goto,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-narrowing-conversions,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-prefer-member-initializer,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-slicing,-cppcoreguidelines-special-member-functions,-google-build-namespaces,-misc-definitions-in-headers,-misc-macro-parentheses,-misc-no-recursion,-misc-non-private-member-variables-in-classes,-misc-suspicious-missing-comma,-misc-unused-parameters,-misc-redundant-expression,-readability-avoid-const-params-in-decls,-readability-function-cognitive-complexity,-readability-function-size,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-misleading-indentation,-readability-simplify-boolean-expr,-readability-static-definition-in-anonymous-namespace,-readability-use-anyofallof src/lib/libndmIpSec.cpp -- -I "src" -I "/usr/lib/llvm-12/lib/clang/12.0.0/include" -DL10N_DOMAIN="\"IpSec\"" -DIDENT=\"lib::libndmIpSec\" -DNAMESPACE=\"lib\" -DNDM_CORE_MODULE_PDEP="\"libndmBridge libndmCore libndmInterface libndmIp\"" -DNDM_CORE_MODULE_LDEP="\"libndmBridge libndmCore libndmInterface libndmIp\"" -DNDM_CORE_MODULE_NAME=libndmIpSec -Isrc -Isrc/Base -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSTDC_FORMAT_MACROS -DSTDC_LIMIT_MACROS -DEVENT_DEBUG -DCLOUD_DEBUG -DUSE_NDM_NDSS -DNDM_PLATFORM_PC -DTARGET_VENDOR="\"NDM Systems, Inc.\"" -DTARGET_VENDOR_SHORT="\"NDM\"" -DTARGET_VENDOR_URL="\"http://www.ndmsystems.com\"" -DTARGET_DEVICE_MANUFACTURER="\"NDM Systems, Inc.\"" -DTARGET_MODEL_SERIES="\"\"" -DTARGET_VENDOR_EMAIL="\"info@ndmsystems.com\"" -DTARGET_CUSTOMER="\"NDM\"" -DTARGET_DEFAULT_PRODUCT="\"\"" -DTARGET_BOARD__="\"pc_ra\"" -DTARGET_FEATURES__="\"\"" -DNDM_VERSION="\"v3.06(AAA.0)A3\"" -DNDM_VERSION_EPOCH="\"3\"" -DNDM_VERSION_MAJOR="\"06\"" -DNDM_VERSION_MINOR="\"3\"" -DNDM_VERSION_STAGE="\"A\"" -DNDM_VERSION_MAINT="\"0\"" -DNDM_VERSION_EXACT="\"11-dd0c22a30\"" -DNDM_VERSION_CDATE="\"29 Oct 2020\"" -DBSP_VERSION_MAINT="\""0"\"" -DBSP_VERSION_BUILD="\""0"\"" -DBSP_VERSION_EXACT="\"\"" -DBSP_VERSION_CDATE="\"29 Oct 2020\"" -DNDM_DEVICE_ID=0x00000000 -DKERNEL_RELEASE="\"5.4.0-52-generic\"" -DFLASHFS="\"/flash\"" -DTMPFS="\"/tmp\"" -DSTORAGEFS="\"/storage\"" -DLIB_DIRECTORY="\"./lib\"" -DAMENDS_DIRECTORY="\"./amends\"" -DCA_CERTS_DIRECTORY="\"./ca-certificates\"" -DCA_CERTS_SIGN_DIRECTORY="\"./sign-ca-certificates\"" -DEULA_ROOT_DIRECTORY="\"./eula\"" -DDPN_ROOT_DIRECTORY="\"./dpn\"" -DNDM_ENV_PATH="\"/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:.\"" -DNDM_MODULES_PACK_NAME="\"\"" -DNDM_FEEDBACK="\"ndmf\"" -DNDM_CORE_SOCKET="\"/var/run/ndm.core.socket\"" -DNDM_FEEDBACK_SOCKET="\"/var/run/ndm.feedback.socket\"" -DNDM_FEEDBACK_PORT=41231 -DNDM_EVENT_SOCKET="\"/var/run/ndm.event.socket\"" -DNDM_SCGI_SOCKET="\"/var/run/ndm.scgi.socket\"" -DNDM_AUTH_SOCKET="\"/var/run/ndm.auth.socket\"" -DNDM_MOUNT_ROOT_PATH="\"/tmp/mnt\"" -DNDM_MODULES_PACK="\"\"" -ffunction-sections -fdata-sections -fvisibility-inlines-hidden -fno-implement-inlines -pthread -Werror -fno-exceptions -fno-rtti -std=c++11 -Wall -Waddress -Wcast-align -Wcast-qual -Wempty-body -Wformat -Wformat-security -Wformat=2 -Wframe-larger-than=262144 -Wignored-qualifiers -Winit-self -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wno-format-nonliteral -Wno-inline -Wnon-virtual-dtor -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector -Wswitch-default -Wswitch-enum -Wtype-limits -Wundef -Wunreachable-code -Wunused -Wvla -Wwrite-strings -fasynchronous-unwind-tables -fno-common -fno-optimize-sibling-calls -fnon-call-exceptions -fstack-protector-all -ftabstop=4 -g3 -ggdb3 -pipe -W -Warc-maybe-repeated-use-of-weak -Warc-repeated-use-of-weak -Warray-bounds-pointer-arithmetic -Wassign-enum -Wbad-function-cast -Wbind-to-temporary-copy -Wbitfield-enum-conversion -Wc++-compat -Wc++11-compat -Wc++11-compat-pedantic -Wc++11-extra-semi -Wc++11-narrowing -Wc++14-binary-literal -Wc++14-extensions -Wc++17-extensions -Wchar-subscripts -Wclass-varargs -Wcomma -Wconditional-uninitialized -Wconsumed -Wdirect-ivar-access -Wdollar-in-identifier-extension -Wdouble-promotion -Wduplicate-enum -Wduplicate-method-arg -Wduplicate-method-match -Wembedded-directive -Wempty-translation-unit -Wexplicit-ownership-type -Wflexible-array-extensions -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wformat-non-iso -Wformat-pedantic -Wgcc-compat -Wglobal-constructors -Wgnu -Wheader-hygiene -Widiomatic-parentheses -Wimplicit-fallthrough-per-function -Wimplicit-retain-self -Winfinite-recursion -Winvalid-offsetof -Wkeyword-macro -Wlanguage-extension-token -Wloop-analysis -Wmethod-signatures -Wmicrosoft -Wmismatched-tags -Wmissing-braces -Wmissing-field-initializers -Wmissing-method-return-type -Wmissing-prototypes -Wmissing-variable-declarations -Wnon-virtual-dtor -Wnull-pointer-arithmetic -Wnullability-extension -Wnullable-to-nonnull-conversion -Wover-aligned -Woverlength-strings -Woverloaded-virtual -Woverriding-method-mismatch -Wpessimizing-move -Wrange-loop-analysis -Wredundant-move -Wredundant-parens -Wsection -Wself-move -Wsemicolon-before-method-body -Wsequence-point -Wshadow-all -Wshift-sign-overflow -Wsign-compare -Wsometimes-uninitialized -Wspir-compat -Wstrict-prototypes -Wstrict-selector-match -Wstring-conversion -Wsuper-class-method-mismatch -Wtautological-compare -Wthread-safety -Wundeclared-selector -Wundef -Wundefined-func-template -Wundefined-internal-type -Wundefined-reinterpret-cast -Wunguarded-availability -Wunguarded-availability-new -Wunneeded-internal-declaration -Wunneeded-member-function -Wunreachable-code-aggressive -Wunused -Wvector-conversion -Wvla -Wweak-template-vtables -Wno-c++98-compat-bind-to-temporary-copy -Wno-cast-align -Wno-global-constructors -Wno-gnu-anonymous-struct -Wno-gnu-folding-constant -Wno-gnu-zero-variadic-macro-arguments -Wno-implicit-fallthrough -Wno-keyword-macro -Wno-language-extension-token -Wno-missing-prototypes -Wno-shadow -Wno-unused-parameter -Wno-unused-result -Wno-zero-length-array 2>&1); err=$?; if [ $err -ne 0 ]; then echo "$out"; fi; exit $err) Segmentation fault (core dumped) PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump:

  1. Program arguments: clang-tidy-12 -warnings-as-errors= -header-filter=. -checks=-,android-,-android-cloexec-pipe,bugprone-,cert-,cppcoreguidelines-,google-build-namespaces,google-readability-casting,google-runtime-memset,llvm-namespace-comment,llvm-twine-local,misc-,modernize-redundant-void-arg,modernize-use-override,perfomance-,readability-,-android-cloexec-accept,-android-cloexec-fopen,-android-cloexec-open,-bugprone-branch-clone,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-parent-virtual-call,-bugprone-reserved-identifier,-bugprone-suspicious-missing-comma,-cert-dcl37-c,-cert-dcl21-cpp,-cert-dcl50-cpp,-cert-dcl51-cpp,-cert-dcl59-cpp,-cert-oop54-cpp,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-goto,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-macro-usage,-cppcoreguidelines-narrowing-conversions,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-prefer-member-initializer,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-slicing,-cppcoreguidelines-special-member-functions,-google-build-namespaces,-misc-definitions-in-headers,-misc-macro-parentheses,-misc-no-recursion,-misc-non-private-member-variables-in-classes,-misc-suspicious-missing-comma,-misc-unused-parameters,-misc-redundant-expression,-readability-avoid-const-params-in-decls,-readability-function-cognitive-complexity,-readability-function-size,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-misleading-indentation,-readability-simplify-boolean-expr,-readability-static-definition-in-anonymous-namespace,-readability-use-anyofallof src/lib/libndmIpSec.cpp -- -I src -I /usr/lib/llvm-12/lib/clang/12.0.0/include -DL10N_DOMAIN="IpSec" -DIDENT="lib::libndmIpSec" -DNAMESPACE="lib" -DNDM_CORE_MODULE_PDEP="libndmBridge libndmCore libndmInterface libndmIp" -DNDM_CORE_MODULE_LDEP="libndmBridge libndmCore libndmInterface libndmIp" -DNDM_CORE_MODULE_NAME=libndmIpSec -Isrc -Isrc/Base -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSTDC_FORMAT_MACROS -DSTDC_LIMIT_MACROS -DEVENT_DEBUG -DCLOUD_DEBUG -DUSE_NDM_NDSS -DNDM_PLATFORM_PC -DTARGET_VENDOR="NDM Systems, Inc." -DTARGET_VENDOR_SHORT="NDM" -DTARGET_VENDOR_URL="http://www.ndmsystems.com" -DTARGET_DEVICE_MANUFACTURER="NDM Systems, Inc." -DTARGET_MODEL_SERIES="" -DTARGET_VENDOR_EMAIL="info@ndmsystems.com" -DTARGET_CUSTOMER="NDM" -DTARGET_DEFAULT_PRODUCT="" -DTARGET_BOARD__="pc_ra" -DTARGET_FEATURES__="" -DNDM_VERSION="v3.06(AAA.0)A3" -DNDM_VERSION_EPOCH="3" -DNDM_VERSION_MAJOR="06" -DNDM_VERSION_MINOR="3" -DNDM_VERSION_STAGE="A" -DNDM_VERSION_MAINT="0" -DNDM_VERSION_EXACT="11-dd0c22a30" -DNDM_VERSION_CDATE="29 Oct 2020" -DBSP_VERSION_MAINT="0" -DBSP_VERSION_BUILD="0" -DBSP_VERSION_EXACT="" -DBSP_VERSION_CDATE="29 Oct 2020" -DNDM_DEVICE_ID=0x00000000 -DKERNEL_RELEASE="5.4.0-52-generic" -DFLASHFS="/flash" -DTMPFS="/tmp" -DSTORAGEFS="/storage" -DLIB_DIRECTORY="./lib" -DAMENDS_DIRECTORY="./amends" -DCA_CERTS_DIRECTORY="./ca-certificates" -DCA_CERTS_SIGN_DIRECTORY="./sign-ca-certificates" -DEULA_ROOT_DIRECTORY="./eula" -DDPN_ROOT_DIRECTORY="./dpn" -DNDM_ENV_PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:." -DNDM_MODULES_PACK_NAME="" -DNDM_FEEDBACK="ndmf" -DNDM_CORE_SOCKET="/var/run/ndm.core.socket" -DNDM_FEEDBACK_SOCKET="/var/run/ndm.feedback.socket" -DNDM_FEEDBACK_PORT=41231 -DNDM_EVENT_SOCKET="/var/run/ndm.event.socket" -DNDM_SCGI_SOCKET="/var/run/ndm.scgi.socket" -DNDM_AUTH_SOCKET="/var/run/ndm.auth.socket" -DNDM_MOUNT_ROOT_PATH="/tmp/mnt" -DNDM_MODULES_PACK="" -ffunction-sections -fdata-sections -fvisibility-inlines-hidden -fno-implement-inlines -pthread -Werror -fno-exceptions -fno-rtti -std=c++11 -Wall -Waddress -Wcast-align -Wcast-qual -Wempty-body -Wformat -Wformat-security -Wformat=2 -Wframe-larger-than=262144 -Wignored-qualifiers -Winit-self -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wno-format-nonliteral -Wno-inline -Wnon-virtual-dtor -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wshadow -Wstack-protector -Wswitch-default -Wswitch-enum -Wtype-limits -Wundef -Wunreachable-code -Wunused -Wvla -Wwrite-strings -fasynchronous-unwind-tables -fno-common -fno-optimize-sibling-calls -fnon-call-exceptions -fstack-protector-all -ftabstop=4 -g3 -ggdb3 -pipe -W -Warc-maybe-repeated-use-of-weak -Warc-repeated-use-of-weak -Warray-bounds-pointer-arithmetic -Wassign-enum -Wbad-function-cast -Wbind-to-temporary-copy -Wbitfield-enum-conversion -Wc++-compat -Wc++11-compat -Wc++11-compat-pedantic -Wc++11-extra-semi -Wc++11-narrowing -Wc++14-binary-literal -Wc++14-extensions -Wc++17-extensions -Wchar-subscripts -Wclass-varargs -Wcomma -Wconditional-uninitialized -Wconsumed -Wdirect-ivar-access -Wdollar-in-identifier-extension -Wdouble-promotion -Wduplicate-enum -Wduplicate-method-arg -Wduplicate-method-match -Wembedded-directive -Wempty-translation-unit -Wexplicit-ownership-type -Wflexible-array-extensions -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wformat-non-iso -Wformat-pedantic -Wgcc-compat -Wglobal-constructors -Wgnu -Wheader-hygiene -Widiomatic-parentheses -Wimplicit-fallthrough-per-function -Wimplicit-retain-self -Winfinite-recursion -Winvalid-offsetof -Wkeyword-macro -Wlanguage-extension-token -Wloop-analysis -Wmethod-signatures -Wmicrosoft -Wmismatched-tags -Wmissing-braces -Wmissing-field-initializers -Wmissing-method-return-type -Wmissing-prototypes -Wmissing-variable-declarations -Wnon-virtual-dtor -Wnull-pointer-arithmetic -Wnullability-extension -Wnullable-to-nonnull-conversion -Wover-aligned -Woverlength-strings -Woverloaded-virtual -Woverriding-method-mismatch -Wpessimizing-move -Wrange-loop-analysis -Wredundant-move -Wredundant-parens -Wsection -Wself-move -Wsemicolon-before-method-body -Wsequence-point -Wshadow-all -Wshift-sign-overflow -Wsign-compare -Wsometimes-uninitialized -Wspir-compat -Wstrict-prototypes -Wstrict-selector-match -Wstring-conversion -Wsuper-class-method-mismatch -Wtautological-compare -Wthread-safety -Wundeclared-selector -Wundef -Wundefined-func-template -Wundefined-internal-type -Wundefined-reinterpret-cast -Wunguarded-availability -Wunguarded-availability-new -Wunneeded-internal-declaration -Wunneeded-member-function -Wunreachable-code-aggressive -Wunused -Wvector-conversion -Wvla -Wweak-template-vtables -Wno-c++98-compat-bind-to-temporary-copy -Wno-cast-align -Wno-global-constructors -Wno-gnu-anonymous-struct -Wno-gnu-folding-constant -Wno-gnu-zero-variadic-macro-arguments -Wno-implicit-fallthrough -Wno-keyword-macro -Wno-language-extension-token -Wno-missing-prototypes -Wno-shadow -Wno-unused-parameter -Wno-unused-result -Wno-zero-length-array
  2. parser at end of file Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x23)[0x7fcfda67f3c3] /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7fcfda67d6f0] /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1(+0xb4ca25)[0x7fcfda67fa25] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fcfe1b7f3c0] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZNK5clang4Stmt9getEndLocEv+0x8)[0x7fcfdfc958d8] clang-tidy-12[0x4f4469] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb09d1)[0x7fcfdfe479d1] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang12ast_matchers8internal21BoundNodesTreeBuilder12visitMatchesEPNS2_7VisitorE+0xcc)[0x7fcfdfe62f6c] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb02e7)[0x7fcfdfe472e7] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xebdd88)[0x7fcfdfe54d88] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb8025)[0x7fcfdfe4f025] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xecb7a1)[0x7fcfdfe627a1] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb3907)[0x7fcfdfe4a907] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb75b6)[0x7fcfdfe4e5b6] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb1e2b)[0x7fcfdfe48e2b] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb75b6)[0x7fcfdfe4e5b6] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb1c36)[0x7fcfdfe48c36] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb75b6)[0x7fcfdfe4e5b6] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb1c36)[0x7fcfdfe48c36] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb75b6)[0x7fcfdfe4e5b6] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb1c36)[0x7fcfdfe48c36] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb75b6)[0x7fcfdfe4e5b6] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb2668)[0x7fcfdfe49668] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang12ast_matchers11MatchFinder8matchASTERNS_10ASTContextE+0x319)[0x7fcfdfe2c299] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang17MultiplexConsumer21HandleTranslationUnitERNS_10ASTContextE+0x2c)[0x7fcfe0e46f0c] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang8ParseASTERNS_4SemaEbb+0x244)[0x7fcfdf8b9664] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7fcfe0e13c98] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x8a1)[0x7fcfe0dc73b1] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling21FrontendActionFactory13runInvocationESt10shared_ptrINS_18CompilerInvocationEEPNS_11FileManagerES2_INS_22PCHContainerOperationsEEPNS_18DiagnosticConsumerE+0x1aa)[0x7fcfe0f86f5a] clang-tidy-12[0x86b866] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling14ToolInvocation13runInvocationEPKcPNS_6driver11CompilationESt10shared_ptrINS_18CompilerInvocationEES7_INS_22PCHContainerOperationsEE+0x11a)[0x7fcfe0f86cba] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling14ToolInvocation3runEv+0xaa4)[0x7fcfe0f85fb4] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling9ClangTool3runEPNS0_10ToolActionE+0xbb8)[0x7fcfe0f88198] clang-tidy-12[0x868557] clang-tidy-12[0x456177] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fcfd961b0b3] clang-tidy-12[0x45404e] make: *** [Makefile:937: src/lib/libndmIpSec.o] Error 139
irishrover commented 3 years ago

Will be fixed in https://reviews.llvm.org/D91037

llvmbot commented 3 years ago

cat main.cpp

include

class RetT { public:

RetT() : code_(0)
{
}

RetT(const uint32_t code) : code_(code)
{
}

~RetT()
{
}

bool Ok() const
{
    return code_ == 0;
}

private:

uint32_t code_;

};

static RetT Test(bool& isSet) { return 0; }

int main() { bool isSet = false;

if( Test(isSet).Ok() && isSet )
{
    if( Test( isSet).Ok() && isSet )
    {
        // do smth
    }
}

return 0;

}

~/experiments$ clang-tidy-12 --checks=bugprone-redundant-branch-condition main.cpp Error while trying to load a compilation database: Could not auto-detect compilation database for file "main.cpp" No compilation database found in /home/vst/experiments or any parent directory fixed-compilation-database: Error while opening fixed database: No such file or directory json-compilation-database: Error while opening JSON database: No such file or directory Running without flags. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump:

  1. Program arguments: clang-tidy-12 --checks=bugprone-redundant-branch-condition main.cpp
  2. parser at end of file Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x23)[0x7f591bdbfb13] /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f591bdbde40] /usr/lib/x86_64-linux-gnu/libLLVM-12.so.1(+0xb51175)[0x7f591bdc0175] /lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f59232fe3c0] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZNK5clang4Stmt9getEndLocEv+0x8)[0x7f592140e948] clang-tidy-12[0x4f4579] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb3c21)[0x7f59215c0c21] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang12ast_matchers8internal21BoundNodesTreeBuilder12visitMatchesEPNS2_7VisitorE+0xcc)[0x7f59215dc1bc] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb3537)[0x7f59215c0537] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xec0fd8)[0x7f59215cdfd8] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xebb275)[0x7f59215c8275] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xece9f1)[0x7f59215db9f1] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb54d2)[0x7f59215c24d2] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeba806)[0x7f59215c7806] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(+0xeb58b8)[0x7f59215c28b8] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang12ast_matchers11MatchFinder8matchASTERNS_10ASTContextE+0x319)[0x7f59215a54e9] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang17MultiplexConsumer21HandleTranslationUnitERNS_10ASTContextE+0x2c)[0x7f59225c316c] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang8ParseASTERNS_4SemaEbb+0x244)[0x7f5921031b34] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7f592258fec8] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x8a1)[0x7f5922543581] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling21FrontendActionFactory13runInvocationESt10shared_ptrINS_18CompilerInvocationEEPNS_11FileManagerES2_INS_22PCHContainerOperationsEEPNS_18DiagnosticConsumerE+0x1aa)[0x7f59227031aa] clang-tidy-12[0x86b636] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling14ToolInvocation13runInvocationEPKcPNS_6driver11CompilationESt10shared_ptrINS_18CompilerInvocationEES7_INS_22PCHContainerOperationsEE+0x11a)[0x7f5922702f0a] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling14ToolInvocation3runEv+0xaa4)[0x7f5922702204] /usr/lib/x86_64-linux-gnu/libclang-cpp.so.12(_ZN5clang7tooling9ClangTool3runEPNS0_10ToolActionE+0xbb8)[0x7f59227043e8] clang-tidy-12[0x868307] clang-tidy-12[0x4561e7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f591ad570b3] clang-tidy-12[0x4540be] Segmentation fault (core dumped)
irishrover commented 3 years ago

Can you please provide a minimal code sample for reproducing?

llvmbot commented 3 years ago

assigned to @irishrover