[LLVMbugs] [Bug 6251] New: Compiled with -O2 program crashes inside libstdc++

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 6 04:46:53 PST 2010


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

           Summary: Compiled with -O2 program crashes inside libstdc++
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sorokin at rain.ifmo.ru
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 6023


The following program (see attachment) crashes when it is compiled with -O2.

ivan at ivan-desktop:~/d/llvm-build/Debug/bin$ ./clang++ -ggdb 13.cpp
ivan at ivan-desktop:~/d/llvm-build/Debug/bin$ ./a.out
ivan at ivan-desktop:~/d/llvm-build/Debug/bin$ ./clang++ -O2 -ggdb 13.cpp
ivan at ivan-desktop:~/d/llvm-build/Debug/bin$ gdb a.out
(gdb) run
Starting program: /home/ivan/d/llvm-build/Debug/bin/a.out 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff733f719 in free () from /lib/libc.so.6
(gdb) backtrace
#0  0x00007ffff733f719 in free () from /lib/libc.so.6
#1  0x00007ffff7b3656f in std::ios_base::~ios_base() () from
/usr/lib/libstdc++.so.6
#2  0x0000000000400eef in main () at 13.cpp:30

If I remove inheritance from fake_base or
If I remove fake_member member or
If I compile without -O2
the program doesn't crash.

Ubuntu 9.10 x86-64.

This bug occur when using boost::format.

I continue my experiments to make more precise bug report.


-- 
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