Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

AOSP build fails due to assertion failure at llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:795 #25912

Closed Quuxplusone closed 8 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR25913
Status RESOLVED WORKSFORME
Importance P normal
Reported by pzheng@codeaurora.org
Reported on 2015-12-21 16:20:16 -0800
Last modified on 2016-01-12 19:45:13 -0800
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org, rnk@google.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Failed when building AOSP for angler with LLVM tip. This only fails with LLVM
tip, not with the prebuilts/clang in AOSP.

To reproduce the issue. Run the following command under the AOSP root dir.

/bin/bash -c "(true) && (mkdir -p
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/)
&& (PWD=/proc/self/cwd /home/aosp/nightly/install/community-
mainline/cross/latest/bin/clang++ -I external/libcxxabi/include -I
external/libcxx/include -I external/libunwind_llvm/include -I
external/libcxxabi -I
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates -I
out/target/product/angler/gen/STATIC_LIBRARIES/libc++abi_intermediates -I
libnativehelper/include/nativehelper \$(cat
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/import_includes)
-isystem system/core/include -isystem system/media/audio/include -isystem
hardware/libhardware/include -isystem hardware/libhardware_legacy/include -
isystem hardware/ril/include -isystem libnativehelper/include -isystem
frameworks/native/include -isystem frameworks/native/opengl/include -isystem
frameworks/av/include -isystem frameworks/base/include -isystem
out/target/product/angler/obj/include -isystem device/huawei/angler/kernel-
headers -isystem hardware/qcom/msm8994/kernel-headers -isystem bionic/libc/arch-
arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -
isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm -
isystem bionic/libm/include -isystem bionic/libm/include/arm -c    -fno-
exceptions -Wno-multichar -msoft-float -ffunction-sections -fdata-sections -
funwind-tables -fstack-protector-strong -Werror=format-security -
D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a7 -
mfloat-abi=softfp -mfpu=neon -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -
Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -
Werror=address -Werror=sequence-point -DNDEBUG -g -Wstrict-aliasing=2 -DNDEBUG -
UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-
reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -
fcolor-diagnostics -nostdlibinc  -target arm-linux-androideabi    -target arm-
linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-
linux-androideabi/bin    -fvisibility-inlines-hidden -Wsign-promo  -Wno-
inconsistent-missing-override -nostdlibinc  -target arm-linux-androideabi   -
mthumb -Os -fomit-frame-pointer -fno-strict-aliasing  -frtti -fPIC -no-
integrated-as -std=gnu++14 -std=c++14 -fexceptions -Wall -Wextra -Wno-unused-
function -Werror -DHAVE___CXA_THREAD_ATEXIT_IMPL -
DLIBCXXABI_USE_LLVM_UNWINDER=1  -Werror=int-to-pointer-cast -Werror=pointer-to-
int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-
type    -Wno-unknown-attributes -MD -MF
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.d
-o
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.o
external/libcxxabi/src/cxa_guard.cpp) && (cp
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.d
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.P;
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/
:/' <
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.d
>>
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.P)"
clang++: /home/aosp/nightly/src/community-
mainline/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:795: bool
emitDebugValueComment(const llvm::MachineInstr *, llvm::AsmPrinter &):
Assertion `Op == dwarf::DW_OP_minus' failed.
0  clang++         0x00000000011f0a88
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  clang++         0x00000000011eef96 llvm::sys::RunSignalHandlers() + 70
2  clang++         0x00000000011f12a9
3  libpthread.so.0 0x00002aee83e45cb0
4  libc.so.6       0x00002aee849b20d5 gsignal + 53
5  libc.so.6       0x00002aee849b583b abort + 379
6  libc.so.6       0x00002aee849aad9e
7  libc.so.6       0x00002aee849aae42
8  clang++         0x000000000173f064
9  clang++         0x0000000000708c03
10 clang++         0x0000000000be16bc
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 124
11 clang++         0x0000000000eb24ed
llvm::FPPassManager::runOnFunction(llvm::Function&) + 349
12 clang++         0x0000000000eb273b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
13 clang++         0x0000000000eb2ce2
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1074
14 clang++         0x00000000013112fd
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*,
std::__1::unique_ptr<llvm::FunctionInfoIndex,
std::__1::default_delete<llvm::FunctionInfoIndex> >) + 9069
15 clang++         0x00000000019eab2b
16 clang++         0x0000000001e06396 clang::ParseAST(clang::Sema&, bool, bool)
+ 598
17 clang++         0x00000000019e91c9 clang::CodeGenAction::ExecuteAction() +
105
18 clang++         0x0000000001630fa6 clang::FrontendAction::Execute() + 70
19 clang++         0x00000000015fdd11
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1121
20 clang++         0x00000000016b3977
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3271
21 clang++         0x000000000070302d cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 989
22 clang++         0x000000000070152f main + 11871
23 libc.so.6       0x00002aee8499d76d __libc_start_main + 237
24 clang++         0x00000000006fe54d
Stack dump:
0.  Program arguments: /home/aosp/nightly/install/community-
mainline/cross/latest/bin/clang++ -cc1 -triple thumbv7--linux-android -S -
disable-free -main-file-name cxa_guard.cpp -mrelocation-model pic -pic-level 2 -
mthread-model posix -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-
as -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu cortex-a7
-target-feature +soft-float-abi -target-feature -fp-only-sp -target-feature -
d16 -target-feature +vfp3 -target-feature -fp16 -target-feature -vfp4 -target-
feature -fp-armv8 -target-feature +neon -target-feature -crypto -target-abi
aapcs-linux -mfloat-abi soft -dwarf-column-info -debug-info-kind=limited -dwarf-
version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-
file
/proc/self/cwd/out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.o
-nostdsysteminc -resource-dir /home/aosp/nightly/install/community-
mainline/cross/latest/bin/../lib/clang/3.8.0 -dependency-file
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.d
-MT
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates/src/cxa_guard.o
-sys-header-deps -isystem system/core/include -isystem
system/media/audio/include -isystem hardware/libhardware/include -isystem
hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem
libnativehelper/include -isystem frameworks/native/include -isystem
frameworks/native/opengl/include -isystem frameworks/av/include -isystem
frameworks/base/include -isystem out/target/product/angler/obj/include -isystem
device/huawei/angler/kernel-headers -isystem hardware/qcom/msm8994/kernel-
headers -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -
isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem
bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem
bionic/libm/include/arm -I external/libcxxabi/include -I
external/libcxx/include -I external/libunwind_llvm/include -I
external/libcxxabi -I
out/target/product/angler/obj_arm/STATIC_LIBRARIES/libc++abi_intermediates -I
out/target/product/angler/gen/STATIC_LIBRARIES/libc++abi_intermediates -I
libnativehelper/include/nativehelper -D _FORTIFY_SOURCE=2 -D ANDROID -D NDEBUG -
D NDEBUG -U DEBUG -D __compiler_offsetof=__builtin_offsetof -D
HAVE___CXA_THREAD_ATEXIT_IMPL -D LIBCXXABI_USE_LLVM_UNWINDER=1 -isysroot
/home/aosp/common/build_tools/64_bit_crosstool_gcc-fsf-arm-linux-gnueabi-
4.9.0/arm-linux-gnueabi/libc -internal-isystem
/home/aosp/nightly/install/community-
mainline/cross/latest/bin/../lib/clang/3.8.0/include -Os -Wno-multichar -
Werror=format-security -W -Wall -Wno-unused -Winit-self -Wpointer-arith -
Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-
point -Wstrict-aliasing=2 -Werror=int-conversion -Wno-reserved-id-macro -Wno-
format-pedantic -Wno-unused-command-line-argument -Wsign-promo -Wno-
inconsistent-missing-override -Wall -Wextra -Wno-unused-function -Werror -
Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-
temporary -Werror=null-dereference -Werror=return-type -Wno-unknown-attributes -
std=c++14 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/proc/self/cwd -ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden -
femulated-tls -stack-protector 2 -fallow-half-arguments-and-returns -fno-signed-
char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/cxa_guard-cf0ee6.s -
x c++ external/libcxxabi/src/cxa_guard.cpp
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module
'external/libcxxabi/src/cxa_guard.cpp'.
4.  Running pass 'ARM Assembly / Object Emitter' on function
'@__cxa_guard_acquire'
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.8.0 (http://llvm.org/git/clang.git
b4292ac60a492da32f5d5f4a63a9c3695b63dc82) (http://llvm.org/git/llvm.git
9a2a614b983da3d0aeb9868c0a18a49051d34cda)
Target: arm--linux-android
Thread model: posix
InstalledDir: /home/aosp/nightly/install/community-mainline/cross/latest/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:
Quuxplusone commented 8 years ago

Please attach pre-processed source code that is normally generated when clang crashes, so that we can easily reproduce the issue.

Quuxplusone commented 8 years ago

Just tried the latest LLVM build and the compiler no longer crashes. Closing the bug.