[LLVMbugs] [Bug 19185] New: Assertion failed, "Cannot define a symbol twice!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 19 00:33:17 PDT 2014


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

            Bug ID: 19185
           Summary: Assertion failed, "Cannot define a symbol twice!"
           Product: tools
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-as
          Assignee: unassignedbugs at nondot.org
          Reporter: irony42 at me.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12253
  --> http://llvm.org/bugs/attachment.cgi?id=12253&action=edit
Crashing file

I can reproducible crash on a particular source file.
I'm on OSX 10.9.2 using MacPorts clang-3.4, using gcc 4.9's -Wa,-q option to
assemble with clang.

Here's the case:
/opt/local/libexec/llvm-3.4/bin/clang -cc1as -triple  -filetype obj <
ccSJANa6-a10d5b.S #attached

The backtrace I get:
Assertion failed: (Symbol->isUndefined() && "Cannot define a symbol twice!"),
function EmitLabel, file MCMachOStreamer.cpp, line 121.
0  libLLVM-3.4.dylib        0x0000000110863388
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.4.dylib        0x0000000110863884 SignalHandler(int) + 548
2  libsystem_platform.dylib 0x00007fff90cbb5aa _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1865697904
4  libLLVM-3.4.dylib        0x0000000110863646 abort + 22
5  libLLVM-3.4.dylib        0x0000000110863621 __assert_rtn + 81
6  libLLVM-3.4.dylib        0x000000011037d8c6 (anonymous
namespace)::MCMachOStreamer::EmitLabel(llvm::MCSymbol*) + 422
7  libLLVM-3.4.dylib        0x00000001103716d8
llvm::MCDwarfFrameEmitter::Emit(llvm::MCStreamer&, llvm::MCAsmBackend*, bool,
bool) + 1960
8  libLLVM-3.4.dylib        0x0000000110394473
llvm::MCStreamer::EmitFrames(llvm::MCAsmBackend*, bool) + 67
9  libLLVM-3.4.dylib        0x000000011037e45d (anonymous
namespace)::MCMachOStreamer::FinishImpl() + 45
10 libLLVM-3.4.dylib        0x00000001103ad5a1 (anonymous
namespace)::AsmParser::Run(bool, bool) + 1505
11 clang                    0x000000010e66a00d cc1as_main(char const**, char
const**, char const*, void*) + 8781
12 clang                    0x000000010e66af61 main + 1089
13 libdyld.dylib            0x00007fff96ed85fd start + 1
14 libdyld.dylib            0x0000000000000006 start + 1762818570
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.4/bin/clang -cc1as -triple
x86_64-apple-macosx10.9.0 -filetype obj
1.    Program arguments: -triple x86_64-apple-macosx10.9.0 -filetype obj
0  libLLVM-3.4.dylib        0x0000000110863388
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.4.dylib        0x0000000110863884 SignalHandler(int) + 548
2  libsystem_platform.dylib 0x00007fff90cbb5aa _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1865697904
4  libLLVM-3.4.dylib        0x0000000110863646 abort + 22
5  libLLVM-3.4.dylib        0x0000000110863621 __assert_rtn + 81
6  libLLVM-3.4.dylib        0x000000011037d8c6 (anonymous
namespace)::MCMachOStreamer::EmitLabel(llvm::MCSymbol*) + 422
7  libLLVM-3.4.dylib        0x00000001103716d8
llvm::MCDwarfFrameEmitter::Emit(llvm::MCStreamer&, llvm::MCAsmBackend*, bool,
bool) + 1960
8  libLLVM-3.4.dylib        0x0000000110394473
llvm::MCStreamer::EmitFrames(llvm::MCAsmBackend*, bool) + 67
9  libLLVM-3.4.dylib        0x000000011037e45d (anonymous
namespace)::MCMachOStreamer::FinishImpl() + 45
10 libLLVM-3.4.dylib        0x00000001103ad5a1 (anonymous
namespace)::AsmParser::Run(bool, bool) + 1505
11 clang                    0x000000010e66a00d cc1as_main(char const**, char
const**, char const*, void*) + 8781
12 clang                    0x000000010e66af61 main + 1089
13 libdyld.dylib            0x00007fff96ed85fd start + 1
14 libdyld.dylib            0x0000000000000006 start + 1762818570
zsh: illegal hardware instruction  "/opt/local/libexec/llvm-3.4/bin/clang"
-cc1as -triple  -filetype obj < 
***


Probably not too relevant, but here's the command that generated the above
case. I'd've included the C source files if they didn't seem to want 20MB of
headers in order to start compiling and exhibit the issue.

gcc-mp-4.9 -Wa,-q -m64 -c -o signal_x86_64.o signal_x86_64.c -I.
-I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC
-fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body
-Wignored-qualifiers -Wstrict-prototypes -Wtype-limits
-Wunused-but-set-parameter -Wwrite-strings -Wpointer-arith -Wlogical-op
-I/Users/ryan/Documents/wineopt/local/include -g -O2

-- 
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/20140319/b9b81c51/attachment.html>


More information about the llvm-bugs mailing list