[LLVMbugs] [Bug 15174] New: Crash with anonymous namespace

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 6 00:48:12 PST 2013


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

            Bug ID: 15174
           Summary: Crash with anonymous namespace
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: orgads at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

A0.    Program arguments: C:/Program Files/LLVM/bin/clang++.exe -cc1 -triple
i686-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name File.cpp
-mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -target-cpu pentium4 -momit-leaf-frame-pointer -g
-coverage-file File.o -resource-dir C:/Program Files/LLVM/bin\..\lib\clang\3.3
-D QT_LARGEFILE_SUPPORT -D _CRT_SECURE_NO_WARNINGS -D WIN32 -D NOGDI -D _DEBUG
-D _MBCS -D _WINDOWS -D HAVE_SNPRINTF -D snprintf=_snprintf -fmodule-cache-path
D:\TEMP\clang-module-cache -internal-isystem C:/Program
Files/LLVM/bin/../lib/clang/3.3/include -internal-isystem C:\Program
Files\Microsoft Visual Studio 10.0\VC\include -internal-isystem C:\Program
Files\Microsoft SDKs\Windows\v7.1\\include -Wall -Wno-write-strings
-Wno-multichar -Wempty-body -Wno-comment -Wno-unknown-pragmas
-Wno-char-subscripts -Wno-format -Wno-switch -Wno-reorder -Wno-sign-compare
-Wno-microsoft -Wno-nested-anon-types -Wno-deprecated-declarations
-Wno-overloaded-virtual -Wunused-private-field -pedantic -std=gnu++0x
-fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -mstackrealign
-fms-extensions -fms-compatibility -fmsc-version=1300
-fdelayed-template-parsing -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -backend-option -vectorize-loops -o File.o -x c++
File.cpp 
1.    <eof> parser at end of file
2.    Code generation
0x102489EB (0x0000000A 0x00000000 0x03E5DDD0 0x10316237), _get_pgmptr() + 0x21B
bytes(s)
0x10324F2E (0x03E5DE90 0x03E5DDE4 0x003A0178 0x000000E6), abort() + 0x1E
bytes(s)
0x10316237 (0x02F888A0 0x02F88840 0x00000287 0x03E5DEF4), _wassert() + 0xB77
bytes(s)
0x010383AA (0x05E103C0 0x03E5DFC8 0x05E90CE0 0x05E91CF8), `anonymous
namespace'::WinCOFFObjectWriter::RecordRelocation() + 0x17A bytes(s),
d:\projects\llvm\lib\mc\wincoffobjectwriter.cpp, line 647 + 0x7A byte(s)
0x010435F9 (0x03E5DFC8 0x05E90CE0 0x05E91CF8 0x03E5E238),
llvm::MCAssembler::handleFixup() + 0x89 bytes(s),
d:\projects\llvm\lib\mc\mcassembler.cpp, line 716 + 0x4A byte(s)
0x01043ADE (0x05F07190 0x05E102A8 0x03E5E050 0x0101C81E),
llvm::MCAssembler::Finish() + 0x47E bytes(s),
d:\projects\llvm\lib\mc\mcassembler.cpp, line 782 + 0x1A byte(s)
0x01062688 (0x05E102A8 0x03E5E060 0x010000EE 0x03E5E068),
llvm::MCObjectStreamer::FinishImpl() + 0x78 bytes(s),
d:\projects\llvm\lib\mc\mcobjectstreamer.cpp, line 356
0x0101C81E (0x03E5E068 0x05E102A8 0x03E5E238 0x00612A58), `anonymous
namespace'::WinCOFFStreamer::FinishImpl() + 0x1E bytes(s),
d:\projects\llvm\lib\mc\wincoffstreamer.cpp, line 323
0x010000EE (0x03E5E320 0x03E5E244 0x05E17D18 0x05E18FE8),
llvm::MCStreamer::Finish() + 0x4E bytes(s),
d:\projects\llvm\lib\mc\mcstreamer.cpp, line 621 + 0x12 byte(s)
0x00612A58 (0x043A2480 0x03E5E264 0x05E107E0 0x00000018),
llvm::AsmPrinter::doFinalization() + 0x878 bytes(s),
d:\projects\llvm\lib\codegen\asmprinter\asmprinter.cpp, line 950
0x00EC3483 (0x043A2480 0x03E5E470 0x03E5E32C 0x00000000),
llvm::FPPassManager::doFinalization() + 0x63 bytes(s),
d:\projects\llvm\lib\ir\passmanager.cpp, line 1570 + 0x22 byte(s)
0x00EC3785 (0x043A2480 0x03E5E52C 0x7FFDA000 0xCCCCCCCC),
llvm::MPPassManager::runOnModule() + 0x2D5 bytes(s),
d:\projects\llvm\lib\ir\passmanager.cpp, line 1627 + 0x2B byte(s)
0x00EC3C73 (0x043A2480 0x05DE5C88 0x03E5E470 0x0111EE2F),
llvm::PassManagerImpl::run() + 0x103 bytes(s),
d:\projects\llvm\lib\ir\passmanager.cpp, line 1705 + 0x1B byte(s)
0x00EC3E6D (0x043A2480 0x03E5E508 0x03E5E52C 0xCCCCCCCC),
llvm::PassManager::run() + 0x1D bytes(s),
d:\projects\llvm\lib\ir\passmanager.cpp, line 1741
0x0111EE2F (0x00000005 0x043A1898 0x03E5E5AC 0xCCCCCCCC), `anonymous
namespace'::EmitAssemblyHelper::EmitAssembly() + 0x2CF bytes(s),
d:\projects\llvm\tools\clang\lib\codegen\backendutil.cpp, line 570
0x0111EF72 (0x04372868 0x04370810 0x04370D08 0x04370C30),
clang::EmitBackendOutput() + 0x52 bytes(s),
d:\projects\llvm\tools\clang\lib\codegen\backendutil.cpp, line 582
0x0111A0EE (0x043999E0 0x03E5E8DC 0x03E5E64C 0x043B61A8),
clang::BackendConsumer::HandleTranslationUnit() + 0x24E bytes(s),
d:\projects\llvm\tools\clang\lib\codegen\codegenaction.cpp, line 162 + 0x3B
byte(s)
0x0149DE78 (0x043B4EB0 0x00000000 0x00000000 0x03E5E8E4), clang::ParseAST() +
0x238 bytes(s), d:\projects\llvm\tools\clang\lib\parse\parseast.cpp, line 142 +
0x18 byte(s)
0x0136B80D (0x03E5E960 0xCCCCCCCC 0xCCCCCCCC 0xCCCCCCCC),
clang::ASTFrontendAction::ExecuteAction() + 0xED bytes(s),
d:\projects\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 474 + 0x30
byte(s)
0x01118F2B (0x03E5E90C 0xCCCCCCCC 0xCCCCCCCC 0xCCCCCCCC),
clang::CodeGenAction::ExecuteAction() + 0x33B bytes(s),
d:\projects\llvm\tools\clang\lib\codegen\codegenaction.cpp, line 424
0x0136B44C (0x03E5EA00 0x03E5FB2C 0xCCCCCCCC 0xCCCCCCCC),
clang::FrontendAction::Execute() + 0xAC bytes(s),
d:\projects\llvm\tools\clang\lib\frontend\frontendaction.cpp, line 382 + 0xF
byte(s)
0x0135C6C1 (0x04377778 0x03E5EFC0 0xCCCCCCCC 0xCCCCCCCC),
clang::CompilerInstance::ExecuteAction() + 0x281 bytes(s),
d:\projects\llvm\tools\clang\lib\frontend\compilerinstance.cpp, line 688
0x010D64D5 (0x04370760 0x03E5FF68 0x04372108 0x04371FB8),
clang::ExecuteCompilerInvocation() + 0x305 bytes(s),
d:\projects\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp,
line 235 + 0x11 byte(s)
0x004137C4 (0x03E5FB34 0x03E5FED0 0x003A86B0 0x0040146A), cc1_main() + 0x2F4
bytes(s), d:\projects\llvm\tools\clang\tools\driver\cc1_main.cpp, line 98 + 0xE
byte(s)
0x00403A69 (0x000000E9 0x003A5C40 0x003A34F8 0x5F3949A1), main() + 0x149
bytes(s), d:\projects\llvm\tools\clang\tools\driver\driver.cpp, line 358 + 0x45
byte(s)
0x020E92EF (0x03E5FFF0 0x7C81776F 0x00000008 0x00000001), __tmainCRTStartup() +
0x1BF bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c, line 555 +
0x19 byte(s)
0x020E911F (0x00000008 0x00000001 0x7FFDA000 0x80000003), mainCRTStartup() +
0xF bytes(s), f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c, line 371
0x7C81776F (0x020E9110 0x00000000 0x00000000 0x00000000),
RegisterWaitForInputIdle() + 0x49 bytes(s)
clang++: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk)
Target: i686-pc-win32
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: D:/TEMP/File-220878.cpp
clang++: note: diagnostic msg: D:/TEMP/File-220878.sh
clang++: note: diagnostic msg: 

********************

I cannot post the entire source code, but the file is quite similar to this:
File.h:
class Pool;

struct Foo
{
    static Pool *GetPool();
};

File.cpp:
namespace {
    union U
    {
        char r_1[10];
        char r_2[20];
    };

    class Container : public Object
    {
        U u;
    public:
        const char *Name() const { return "Container"; }
    };

        // TPool<T> derives from Pool
    typedef TPool<Container> ContainerPool;

    ContainerPool MyPool(20);
}

Pool *Foo::GetPool() { return &MyPool; }

-- 
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/20130206/331f7655/attachment.html>


More information about the llvm-bugs mailing list