[llvm-commits] [llvm] r148691 - in /llvm/trunk/lib/VMCore: Constants.cpp ConstantsContext.h LLVMContextImpl.cpp LLVMContextImpl.h

Alexander Potapenko glider at google.com
Mon Jan 23 03:40:13 PST 2012


Hi Chris,

I believe this patch has broken AddressSanitizer (and probably other patches).
I get the following error message from clang r148696:


clang: /usr/local/google/asan/asan-llvm-trunk/llvm/include/llvm/ADT/OwningPtr.h:34:
llvm::OwningPtr<T>::OwningPtr(const llvm::OwningPtr<T>&) [with T =
llvm::ConstantAggregateZero]: Assertion `RHS.Ptr == 0 && "Only null
OwningPtr's are copyable!"' failed.
0  clang           0x0000000001dad27f
1  clang           0x0000000001daf4f2
2  libpthread.so.0 0x00007ff3b2e7b8f0
3  libc.so.6       0x00007ff3b216aa75 gsignal + 53
4  libc.so.6       0x00007ff3b216e5c0 abort + 384
5  libc.so.6       0x00007ff3b2163941 __assert_fail + 241
6  clang           0x0000000001c95949
7  clang           0x0000000001c90c15
llvm::ConstantAggregateZero::get(llvm::Type*) + 677
8  clang           0x0000000001c94548
llvm::ConstantStruct::get(llvm::StructType*, ...) + 248
9  clang           0x00000000011d2a41
10 clang           0x00000000011d3d9c
11 clang           0x0000000001d4c5e1
llvm::MPPassManager::runOnModule(llvm::Module&) + 497
12 clang           0x0000000001d4c76b
llvm::PassManagerImpl::run(llvm::Module&) + 187
13 clang           0x00000000007a8945
clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1525
14 clang           0x00000000007a5c01
15 clang           0x00000000008ffd2f clang::ParseAST(clang::Sema&, bool) + 511
16 clang           0x00000000007a47d4 clang::CodeGenAction::ExecuteAction() + 68
17 clang           0x000000000064b271
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 321
18 clang           0x0000000000634369
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1401
19 clang           0x000000000062a339 cc1_main(char const**, char
const**, char const*, void*) + 745
20 clang           0x0000000000633137 main + 7207
21 libc.so.6       0x00007ff3b2155c4d __libc_start_main + 253
22 clang           0x0000000000627d49
Stack dump:
0.	Program arguments:
/usr/local/google/asan/asan-llvm-trunk/llvm/build/Release+Asserts/bin/clang
-cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free
-main-file-name asan_test.cc -mrelocation-model static -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -g -coverage-file
bin_linux/asan_test32.o -resource-dir
/usr/local/google/asan/asan-llvm-trunk/llvm/build/Release+Asserts/bin/../lib/clang/3.1
-D ASAN_UAR=0 -D ASAN_HAS_EXCEPTIONS=1 -D ASAN_NEEDS_SEGV=1 -D
ASAN_HAS_BLACKLIST=1 -I third_party/googletest/include -I .
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/x86_64-linux-gnu/32
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/google/asan/asan-llvm-trunk/llvm/build/Release+Asserts/bin/../lib/clang/3.1/include
-internal-externc-isystem /usr/include/i486-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -O2 -Wall -fdeprecated-macro -faddress-sanitizer
-fdebug-compilation-dir
/usr/local/google/asan/asan-llvm-trunk/llvm/projects/compiler-rt/lib/asan
-ferror-limit 19 -fmessage-length 221 -fvisibility hidden
-mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -mllvm
-asan-blacklist=/usr/local/google/asan/asan-llvm-trunk/llvm/projects/compiler-rt/lib/asan/tests/asan_test.ignore
-mllvm -asan-stack=1 -mllvm -asan-globals=1 -mllvm
-asan-mapping-scale=0 -mllvm -asan-mapping-offset-log=-1 -mllvm
-asan-use-after-return=0 test.ii
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'AddressSanitizer' on module 'test.ii'.

(I'll prepare a smaller reproducer and file a bug soon)



More information about the llvm-commits mailing list