[LLVMbugs] [Bug 15587] New: Clang crashes compiling __sync_val_compare_and_swap for ARM-Android

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 25 08:36:00 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15587

            Bug ID: 15587
           Summary: Clang crashes compiling __sync_val_compare_and_swap
                    for ARM-Android
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: samsonov at google.com
                CC: eugeni.stepanov at gmail.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I see the following error when compiling fresh compiler-rt test for
ARM-Android:

Sorry for not providing a short reproducer, but maybe someone would get insight
from the error message. Attaching preprocessed source and invocation command as
well.

ExpandIntegerResult #0: 0x4c37020: i64,ch = AtomicCmpSwap 0x4bfd930, 0x4c37420,
0x4bfca20, 0x4c36c20<Volatile LDST8[%var]> [ORD=2201] [ID=0]
dbg:/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/../sanitizer_atomic_clang.h:107

Do not know how to expand the result of this operator!
UNREACHABLE executed at
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1095!
0  clang-3.3       0x0000000001193335 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  clang-3.3       0x0000000001193823
2  libpthread.so.0 0x00002adf00bd8cb0
3  libc.so.6       0x00002adf0162f425 gsignal + 53
4  libc.so.6       0x00002adf01632b8b abort + 379
5  clang-3.3       0x0000000001164c48 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 440
6  clang-3.3       0x0000000000be624f
7  clang-3.3       0x0000000000b885b3
8  clang-3.3       0x0000000000b8dab5 llvm::SelectionDAG::LegalizeTypes() + 37
9  clang-3.3       0x0000000000b43918
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1320
10 clang-3.3       0x0000000000b42bf7
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 6135
11 clang-3.3       0x0000000000b40746
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1302
12 clang-3.3       0x0000000000c80c3d
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 125
13 clang-3.3       0x00000000010d9d33
llvm::FPPassManager::runOnFunction(llvm::Function&) + 355
14 clang-3.3       0x00000000010d9fab
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
15 clang-3.3       0x00000000010da2f4
llvm::MPPassManager::runOnModule(llvm::Module&) + 420
16 clang-3.3       0x00000000010da99b llvm::PassManagerImpl::run(llvm::Module&)
+ 539
17 clang-3.3       0x00000000010dab0a llvm::PassManager::run(llvm::Module&) +
10
18 clang-3.3       0x00000000011b0457
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5863
19 clang-3.3       0x00000000011ad1eb
20 clang-3.3       0x000000000142ba93 clang::ParseAST(clang::Sema&, bool, bool)
+ 515
21 clang-3.3       0x00000000011ac252 clang::CodeGenAction::ExecuteAction() +
194
22 clang-3.3       0x0000000001381271 clang::FrontendAction::Execute() + 113
23 clang-3.3       0x000000000136253d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 909
24 clang-3.3       0x00000000011960a7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2983
25 clang-3.3       0x000000000063f8d5 cc1_main(char const**, char const**, char
const*, void*) + 693
26 clang-3.3       0x000000000063d2bb main + 7147
27 libc.so.6       0x00002adf0161a76d __libc_start_main + 237
28 clang-3.3       0x000000000063b5a5
Stack dump:
0.  Program arguments:
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm_build64/bin/clang-3.3
-cc1 -triple armv4t--linux-androideabi -S -disable-free -main-file-name
sanitizer_atomic_test.cc -mrelocation-model pic -pic-level 2 -fmath-errno
-mconstructor-aliases -munwind-tables -fuse-init-array -target-abi aapcs-linux
-target-cpu arm7tdmi -msoft-float -mfloat-abi soft -target-feature +soft-float
-target-feature +soft-float-abi -target-feature -neon -momit-leaf-frame-pointer
-g -coverage-file /tmp/sanitizer_atomic_test-hVaJv8.s -resource-dir
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm_build64/bin/../lib/clang/3.3
-D _DEBUG -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D
__STDC_LIMIT_MACROS -D NDEBUG -U NDEBUG -D GTEST_NO_LLVM_RAW_OSTREAM=1 -D
GTEST_HAS_RTTI=0 -I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm_build64/android/projects/compiler-rt/lib/sanitizer_common/tests
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm_build64/android/include
-I /usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/include -I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/include
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/..
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/../..
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/utils/unittest/googletest/include
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/include
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib
-I
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common
-isysroot
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/sysroot
-internal-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/lib/gcc/arm-linux-androideabi/4.6/../../../../include/c++/4.6
-internal-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/lib/gcc/arm-linux-androideabi/4.6/../../../../include/c++/4.6/arm-linux-androideabi
-internal-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/lib/gcc/arm-linux-androideabi/4.6/../../../../include/c++/4.6/backward
-internal-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/lib/gcc/arm-linux-androideabi/4.6/../../../../include/arm-linux-androideabi/c++/4.6
-internal-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/sysroot/usr/local/include
-internal-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm_build64/bin/../lib/clang/3.3/include
-internal-externc-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/sysroot/include
-internal-externc-isystem
/usr/local/google/dtoolsbot/slave/linux-cmake/build/../../../android-ndk/standalone/sysroot/usr/include
-O2 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers
-Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wno-variadic-macros
-Wno-c99-extensions -Wno-non-virtual-dtor -Wall -Werror -Werror=sign-compare
-pedantic -fconst-strings -fdeprecated-macro -fno-dwarf-directory-asm
-fdebug-compilation-dir
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm_build64/android/projects/compiler-rt/lib/sanitizer_common/tests
-ferror-limit 19 -fmessage-length 0 -fvisibility hidden
-fvisibility-inlines-hidden -mstackrealign -fno-builtin -fno-rtti
-fno-signed-char -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -backend-option -vectorize-loops -mllvm
-arm-enable-ehabi -o /tmp/sanitizer_atomic_test-hVaJv8.s -x c++
/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_atomic_test.cc 
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module
'/usr/local/google/dtoolsbot/slave/linux-cmake/build/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_atomic_test.cc'.
4.  Running pass 'ARM Instruction Selection' on function
'@_ZN11__sanitizer26CheckAtomicCompareExchangeINS_15atomic_uint64_tEEEvv'
clang-3.3: error: unable to execute command: Aborted (core dumped)
clang-3.3: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 177870)
Target: arm--linux-androideabi
Thread model: posix
clang-3.3: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
[100%] Building CXX object
projects/compiler-rt/lib/asan/CMakeFiles/clang_rt.asan-arm-android.dir/asan_malloc_linux.cc.o
[100%] Building CXX object
projects/compiler-rt/lib/asan/CMakeFiles/clang_rt.asan-arm-android.dir/asan_malloc_mac.cc.o
[100%] Building CXX object
projects/compiler-rt/lib/asan/CMakeFiles/clang_rt.asan-arm-android.dir/asan_malloc_win.cc.o
clang-3.3: note: diagnostic msg: 
********************

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130325/244c423c/attachment.html>


More information about the llvm-bugs mailing list