Boost 1.48 beta release and Clang TOT crash

When I try to run the unit tests for Boost.Math from the Boost 1.48 beta release (from here: http://boost.cowic.de/rc/ ), I get lots of crashes.

[ I will try to cut this down in the morning, but I thought that people might want to see this before then ]
The clang that shipped with Xcode 4.2 does not crash.

unpack, cd into the directory and:
  ./bootstrap.sh
  cd libs/math/test
  ../../../b2 --toolset=clang

Here's one such crash:

clang-darwin.compile.c++ ../../../bin.v2/libs/math/test/hypot_test.test/clang-darwin-4.2.1/debug/hypot_test.o
0 clang 0x00000001038b7eb2 _ZL15PrintStackTracePv + 34
1 clang 0x00000001038b84a9 _ZL13SignalHandleri + 777
2 libsystem_c.dylib 0x00007fff815e1cfa _sigtramp + 26
3 clang 0x0000000103827d62 llvm::DenseMap<llvm::Value*, llvm::ValueHandleBase*, llvm::DenseMapInfo<llvm::Value*>, llvm::DenseMapInfo<llvm::ValueHandleBase*> >::FindAndConstruct(llvm::Value* const&) + 162
4 clang 0x000000010380bdea llvm::StringMapEntry<llvm::MDString*>& llvm::StringMap<llvm::MDString*, llvm::MallocAllocator>::GetOrCreateValue<llvm::MDString*>(llvm::StringRef, llvm::MDString*) + 42
5 clang 0x000000010380926f llvm::MDString::get(llvm::LLVMContext&, llvm::StringRef) + 31
6 clang 0x00000001036cd7ad llvm::DIBuilder::createPointerType(llvm::DIType, unsigned long long, unsigned long long, llvm::StringRef) + 93
7 clang 0x0000000102713ac5 clang::CodeGen::CGDebugInfo::getOrCreateVTablePtrType(llvm::DIFile) + 373
8 clang 0x0000000102713d7c clang::CodeGen::CGDebugInfo::CollectVTableInfo(clang::CXXRecordDecl const*, llvm::DIFile, llvm::SmallVectorImpl<llvm::Value*>&) + 220
9 clang 0x0000000102714492 clang::CodeGen::CGDebugInfo::CreateType(clang::RecordType const*) + 1442
10 clang 0x00000001027161be clang::CodeGen::CGDebugInfo::CreateType(clang::TagType const*) + 62
11 clang 0x0000000102717240 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 624
12 clang 0x000000010270ebbd clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 349
13 clang 0x000000010270e6ed clang::CodeGen::CGDebugInfo::getContextDescriptor(clang::Decl const*) + 349
14 clang 0x0000000102713fca clang::CodeGen::CGDebugInfo::CreateType(clang::RecordType const*) + 218
15 clang 0x00000001027161be clang::CodeGen::CGDebugInfo::CreateType(clang::TagType const*) + 62
16 clang 0x0000000102717240 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 624
17 clang 0x000000010270ebbd clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 349
18 clang 0x000000010271be99 clang::CodeGen::CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable*, clang::VarDecl const*) + 665
19 clang 0x00000001027bd40d clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*) + 1037
20 clang 0x00000001027ba630 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 352
21 clang 0x00000001027bbd2a clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1562
22 clang 0x00000001027c00ba clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 282
23 clang 0x00000001027c010b clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 363
24 clang 0x00000001027d99bf (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 127
25 clang 0x00000001027b2c4a clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 170
26 clang 0x00000001027e3692 clang::ParseAST(clang::Sema&, bool) + 306
27 clang 0x00000001027b1db7 clang::CodeGenAction::ExecuteAction() + 1031
28 clang 0x00000001025c0b1b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 955
29 clang 0x00000001025aaeb8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2792
30 clang 0x00000001025a34d1 cc1_main(char const**, char const**, char const*, void*) + 5265
31 clang 0x00000001025a7252 main + 706
32 clang 0x00000001025a2034 start + 52
Stack dump:
0. Program arguments: /Volumes/EyeFive/Marshall/Sources/LLVM/llvm-nodebug/Release+Asserts/bin/clang -cc1 -triple x86_64-apple-macosx10.7.2 -emit-obj -mrelax-all -disable-free -main-file-name hypot_test.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 127.2 -g -coverage-file ../../../bin.v2/libs/math/test/hypot_test.test/clang-darwin-4.2.1/debug/hypot_test.o -resource-dir /Volumes/EyeFive/Marshall/Sources/LLVM/llvm-nodebug/Release+Asserts/bin/../lib/clang/3.1 -D BOOST_ALL_NO_LIB=1 -D BOOST_REGEX_DYN_LINK=1 -D BOOST_TEST_NO_AUTO_LINK=1 -D BOOST_UBLAS_UNSUPPORTED_COMPILER=0 -I . -I ../../.. -fmodule-cache-path /var/folders/wt/6psqhnsj5bs536b02b3nwd8h0000gn/T/clang-module-cache -O0 -Wall -fdeprecated-macro -fdebug-compilation-dir /Volumes/EyeFive/Marshall/Don't Back up/boost_1_48_0_beta1/libs/math/test -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o ../../../bin.v2/libs/math/test/hypot_test.test/clang-darwin-4.2.1/debug/hypot_test.o -x c++ hypot_test.cpp
1. ../../../boost/current_function.hpp:22:1: current parser token 'namespace'
2. /usr/include/c++/4.2.1/iostream:47:1 <Spelling=/usr/include/c++/4.2.1/iostream:47:26>: LLVM IR generation of declaration 'std'
3. /usr/include/c++/4.2.1/iostream:76:25: Generating code for declaration 'std::__ioinit'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation)
clang: note: diagnostic msg: Please submit a bug report to http://llvm.org/bugs/ and include command line arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) are located at:
clang: note: diagnostic msg: /var/folders/wt/6psqhnsj5bs536b02b3nwd8h0000gn/T/hypot_test-nMDhhK.ii

    "clang++" -x c++ -O0 -g -O0 -fno-inline -Wall -g -DBOOST_ALL_NO_LIB=1 -DBOOST_REGEX_DYN_LINK=1 -DBOOST_TEST_NO_AUTO_LINK=1 -DBOOST_UBLAS_UNSUPPORTED_COMPILER=0 -I"." -I"../../.." -c -o "../../../bin.v2/libs/math/test/hypot_test.test/clang-darwin-4.2.1/debug/hypot_test.o" "hypot_test.cpp"

...failed clang-darwin.compile.c++ ../../../bin.v2/libs/math/test/hypot_test.test/clang-darwin-4.2.1/debug/hypot_test.o…

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists@gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

Great. :frowning:

Can you put in a bug with a preprocessed source file?

Thanks!

-eric

Yes.
Late tonight, or early tomorrow.

– Marshall

Marshall Clow Idio Software <mailto:mclow.lists@gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
– Yu Suzuki

Great. :frowning:

Can you put in a bug with a preprocessed source file?

Yes.
Late tonight, or early tomorrow.

No worries, and thanks again :slight_smile:

-eric

With today's TOT [ (clang version 3.1 (trunk 143196) ] the Boost.Math tests build and run w/o incident.

I'll keep an eye on it, and if it happens again, will file a bug.

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists@gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki

Did you perchance check with the 3.0 branch? We wouldn't want this bug (whatever it was) to go into the 3.0 release.

  - Doug