llvm / llvm-project

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

segfault in clang::SourceManager::getLineNumber #31812

Closed llvmbot closed 7 years ago

llvmbot commented 7 years ago
Bugzilla Link 32465
Resolution INVALID
Resolved on Apr 03, 2017 23:11
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @vedantk

Extended Description

​0 0x0000000001bc9dd4 (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x1bc9dd4)

​1 0x0000000001bca106 (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x1bca106)

​2 0x00007f3f9c959330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)

​3 0x0000000001d3a4f3 (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x1d3a4f3)

​4 0x0000000001d3a2ea clang::SourceManager::getLineNumber(clang::FileID, unsigned int, bool*) const (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x1d3a2ea)

​5 0x0000000001d39fc2 clang::SourceManager::getPresumedLoc(clang::SourceLocation, bool) const (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x1d39fc2)

​6 0x00007f3f9b2cfb5b ChromeClassTester::InBannedDirectory(clang::SourceLocation) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x1db5b)

​7 0x00007f3f9b2cf5c9 ChromeClassTester::CheckTag(clang::TagDecl*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x1d5c9)

​8 0x00007f3f9b2e9983 clang::RecursiveASTVisitor::TraverseEnumDecl(clang::EnumDecl*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x37983)

​9 0x00007f3f9b2d33bd clang::RecursiveASTVisitor::TraverseDecl(clang::Decl*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x213bd)

​10 0x00007f3f9b2eb24c clang::RecursiveASTVisitor::TraverseDeclContextHelper(clang::DeclContext*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x3924c)

​11 0x00007f3f9b2d3840 clang::RecursiveASTVisitor::TraverseDecl(clang::Decl*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x21840)

​12 0x00007f3f9b2eb24c clang::RecursiveASTVisitor::TraverseDeclContextHelper(clang::DeclContext*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x3924c)

​13 0x00007f3f9b2d3840 clang::RecursiveASTVisitor::TraverseDecl(clang::Decl*) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x21840)

​14 0x00007f3f9b2d2e74 chrome_checker::FindBadConstructsConsumer::Traverse(clang::ASTContext&) (../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so+0x20e74)

​15 0x000000000213202c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x213202c)

​16 0x000000000288c176 clang::ParseAST(clang::Sema&, bool, bool) (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x288c176)

​17 0x000000000210cfd8 clang::FrontendAction::Execute() (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x210cfd8)

​18 0x00000000020d3ae1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x20d3ae1)

​19 0x0000000002191ca0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x2191ca0)

​20 0x000000000082ccac cc1_main(llvm::ArrayRef<char const>, char const, void*) (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x82ccac)

​21 0x000000000082ac26 main (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x82ac26)

​22 0x00007f3f9b535f45 __libc_start_main /build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0

​23 0x0000000000827dd9 _start (/y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang+0x827dd9)

Stack dump:

  1. Program arguments: /y/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name CoreProbesImpl.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info -backend-option -split-dwarf=Enable -debug-info-kind=limited -debugger-tuning=gdb -coverage-notes-file /y/src/chrome/src/out/default/obj/third_party/WebKit/Source/core/probe/generated/CoreProbesImpl.gcno -resource-dir /y/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0 -dependency-file obj/third_party/WebKit/Source/core/probe/generated/CoreProbesImpl.o.d -MT obj/third_party/WebKit/Source/core/probe/generated/CoreProbesImpl.o -D V8_DEPRECATION_WARNINGS -D USE_UDEV -D USE_AURA=1 -D USE_PANGO=1 -D USE_CAIRO=1 -D USE_GLIB=1 -D USE_NSS_CERTS=1 -D USE_X11=1 -D DISABLE_NACL -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D CHROMIUM_BUILD -D ENABLE_MEDIA_ROUTER=1 -D FIELDTRIAL_TESTING_ENABLED -D CR_CLANG_REVISION="298539-1" -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D _LARGEFILE64_SOURCE -D STDC_CONSTANT_MACROS -D STDC_FORMAT_MACROS -D COMPONENT_BUILD -D _DEBUG -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D WTF_USE_DYNAMIC_ANNOTATIONS=1 -D _GLIBCXX_DEBUG=1 -D BLINK_CORE_IMPLEMENTATION=1 -D GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -D GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -D SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -D SKIA_DLL -D GR_GL_IGNORE_ES3_MSAA=0 -D SK_SUPPORT_GPU=1 -D ENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -D ENABLE_OILPAN=1 -D WTF_USE_DYNAMIC_ANNOTATIONS=1 -D WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -D WTF_USE_WEBAUDIO_FFMPEG=1 -D WTF_USE_DEFAULT_RENDER_THEME=1 -D U_USING_ICU_NAMESPACE=0 -D U_ENABLE_DYLOAD=0 -D ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -D USING_V8_SHARED -I ../.. -I gen -I ../../third_party/WebKit/Source/platform -I ../../third_party/WebKit/Source -I ../../third_party/WebKit -I gen/blink -I gen/third_party/WebKit -I ../../third_party/WebKit/Source -I gen/blink -I ../../build/linux/debian_wheezy_amd64-sysroot/usr/include/glib-2.0 -I ../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I ../../skia/config -I ../../skia/ext -I ../../third_party/skia/include/c -I ../../third_party/skia/include/config -I ../../third_party/skia/include/core -I ../../third_party/skia/include/effects -I ../../third_party/skia/include/images -I ../../third_party/skia/include/lazy -I ../../third_party/skia/include/pathops -I ../../third_party/skia/include/pdf -I ../../third_party/skia/include/pipe -I ../../third_party/skia/include/ports -I ../../third_party/skia/include/utils -I ../../third_party/skia/include/gpu -I ../../third_party/skia/src/gpu -I ../../third_party/skia/src/sksl -I ../../third_party/icu/source/common -I ../../third_party/icu/source/i18n -I ../../v8/include -I gen/v8/include -D DATE= -D TIME= -D TIMESTAMP= -isysroot ../../build/linux/debian_wheezy_amd64-sysroot -internal-isystem ../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6 -internal-isystem ../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu -internal-isystem ../../build/linux/debian_wheezy_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward -internal-isystem ../../build/linux/debian_wheezy_amd64-sysroot/usr/local/include -internal-isystem /y/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0/include -internal-externc-isystem ../../build/linux/debian_wheezy_amd64-sysroot/usr/include/x86_64-linux-gnu -internal-externc-isystem ../../build/linux/debian_wheezy_amd64-sysroot/include -internal-externc-isystem ../../build/linux/debian_wheezy_amd64-sysroot/usr/include -O0 -Wno-builtin-macro-redefined -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -fdeprecated-macro -fdebug-compilation-dir /y/src/chrome/src/out/default -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -pthread -stack-protector 1 -stack-protector-buffer-size 4 -fno-rtti -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -load ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -add-plugin find-bad-constructs -plugin-arg-find-bad-constructs check-auto-raw-pointer -plugin-arg-find-bad-constructs check-ipc -load ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.so -add-plugin blink-gc-plugin -o obj/third_party/WebKit/Source/core/probe/generated/CoreProbesImpl.o -x c++ gen/blink/core/CoreProbesImpl.cpp -split-dwarf-file obj/third_party/WebKit/Source/core/probe/generated/CoreProbesImpl.dwo
  2. parser at end of file clang: error: unable to execute command: Segmentation fault (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 5.0.0 (trunk 298539) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /y/src/chrome/src/out/default/../../third_party/llvm-build/Release+Asserts/bin clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang: note: diagnostic msg: ********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/CoreProbesImpl-5ba370.cpp clang: note: diagnostic msg: /tmp/CoreProbesImpl-5ba370.sh clang: note: diagnostic msg:


vedantk commented 7 years ago

The bug here is most likely in the blink-gc-plugin, which does not live on llvm.org. Maybe you could try reporting it here:

http://www.chromium.org/for-testers/bug-reporting-guidelines

llvmbot commented 7 years ago

Files are too big to attach, so uploaded here: https://drive.google.com/open?id=0B6LoBk3AgJDSYWJCSi1MRDJoWHc