Compiler crash on libclang with r171300

Hello,

I was trying to compile the Release+Assert of LLVM + Clang at r171300 and I hit an assertion building ~/llvm/tools/clang/tools/libclang/ARCMigrate.cpp with the newly built clang (whilst the Debug build worked fine).

(and no I don’t care to create a BugZilla account to report a bug…)

Console:

clang: ~/llvm/include/llvm/ADT/APInt.h:888: bool llvm::APInt::operator==(const llvm::APInt &) const: Assertion `BitWidth == RHS.BitWidth && “Comparison requires equal bit widths”’ failed.
0 clang 0x09bfa4e9
Stack dump:
0. Program arguments: ~/llvm-release/Release+Asserts/bin/clang -cc1 -triple i386-pc-linux-gnu -emit-obj -disable-free -main-file-name ARCMigrate.cpp -mrelocation-model pic -pic-level 2 -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22 -momit-leaf-frame-pointer -coverage-file ~/llvm-release/tools/clang/tools/libclang/Release+Asserts/ARCMigrate.o -resource-dir ~/llvm-release/Release+Asserts/bin/…/lib/clang/3.3 -dependency-file ~/llvm-release/tools/clang/tools/libclang/Release+Asserts/ARCMigrate.d.tmp -MP -MT ~/llvm-release/tools/clang/tools/libclang/Release+Asserts/ARCMigrate.o -MT ~/llvm-release/tools/clang/tools/libclang/Release+Asserts/ARCMigrate.d -D _DEBUG -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -I ~/llvm-release/include -I ~/llvm-release/tools/clang/tools/libclang -I ~/llvm/include -I ~/llvm/tools/clang/tools/libclang -I ~/llvm/tools/clang/tools/libclang/…/…/include -I ~/llvm-release/tools/clang/tools/libclang/…/…/include -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.6/…/…/…/…/include/c++/4.6 -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.6/…/…/…/…/include/c++/4.6/i686-linux-gnu -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.6/…/…/…/…/include/c++/4.6/backward -internal-isystem /usr/local/include -internal-isystem ~/llvm-release/Release+Asserts/bin/…/lib/clang/3.3/include -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Woverloaded-virtual -Wcast-qual -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcovered-switch-default -pedantic -fconst-strings -fdeprecated-macro -fdebug-compilation-dir ~/llvm-release/tools/clang/tools/libclang -ferror-limit 19 -fmessage-length 207 -fvisibility-inlines-hidden -mstackrealign -fno-rtti -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o ~/llvm-release/tools/clang/tools/libclang/Release+Asserts/ARCMigrate.o -x c++ ~/llvm/tools/clang/tools/libclang/ARCMigrate.cpp

  1. parser at end of file
  2. Per-module optimization passes
  3. Running pass ‘CallGraph Pass Manager’ on module ‘~/llvm/tools/clang/tools/libclang/ARCMigrate.cpp’.
  4. Running pass ‘Global Value Numbering’ on function ‘@clang_getRemappingsFromFileList
    clang: error: unable to execute command: Aborted (core dumped)
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.3 (trunk 171300)
    Target: i386-pc-linux-gnu
    Thread model: posix
    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.

ARCMigrate-DVKTIX.rar (461 KB)

ARCMigrate-DVKTIX.sh (800 Bytes)

Hello,

I was trying to compile the Release+Assert of LLVM + Clang at r171300 and I hit an assertion building ~/llvm/tools/clang/tools/libclang/ARCMigrate.cpp with the newly built clang (whilst the Debug build worked fine).

(and no I don't care to create a BugZilla account to report a bug...)

I reverted the offending change in r171318, selfhost should work again.

- Ben

Hello,

I was trying to compile the Release+Assert of LLVM + Clang at r171300 and I hit an assertion building ~/llvm/tools/clang/tools/libclang/ARCMigrate.cpp with the newly built clang (whilst the Debug build worked fine).

(and no I don’t care to create a BugZilla account to report a bug…)

I reverted the offending change in r171318, selfhost should work again.

  • Ben

I confirm that r171342 works again (well, I don’t have compiler-rt checked out, so it works up until that point at least). Thanks!

– Matthieu