[LLVMbugs] [Bug 12802] New: odd crash from linker

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 11 15:49:39 PDT 2012


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

             Bug #: 12802
           Summary: odd crash from linker
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: chenyang at cs.utah.edu, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


[regehr at dyson r45]$ clang  -O0 small.c
[regehr at dyson r45]$ clang  -O1 small.c
/tmp/small-GNORdv.o: In function `fn1':
small.c:(.text+0x2f): relocation truncated to fit: R_X86_64_32 against symbol
`d' defined in .bss section in /tmp/small-GNORdv.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[regehr at dyson r45]$ cat small.c
short a;
int b;
char c;
int d[][81] = {
};
void
fn1 ()
{
    char *e = &c;
    for (;;)
    {
        if (b)
            continue;
        a = 0;
        for (; a >= 0; a--)
        {
            if (b)
                break;
            *e = d[a][0];
        }
    }
}

int main (void)
{
}
[regehr at dyson r45]$ clang -v
clang version 3.2 (trunk 156655)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list