[Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os

markus at trippelsdorf dot de gcc-bugzilla@gcc.gnu.org
Fri Nov 9 18:12:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253

             Bug #: 55253
           Summary: [4.8 Regression] Revision 193298 miscompiles sqlite
                    with -Os
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


r193298 miscompiles sqlite with -Os (and thereby crashes
Firefox during startup):

Program received signal SIGSEGV, Segmentation fault.
sqlite3DbRealloc (db=0x0, p=p@entry=0x0, n=n@entry=9) at sqlite3.c:19120
(gdb) bt
#0  sqlite3DbRealloc (db=0x0, p=p@entry=0x0, n=n@entry=9) at sqlite3.c:19120
#1  0x00007ffff7f908e5 in sqlite3StrAccumAppend (p=0x7fffffffcdb8, z=0x4082e9
"sqlite> ", N=8) at sqlite3.c:19966
#2  0x00007ffff7f909d9 in sqlite3VXPrintf (pAccum=0x7fffffffcdb8,
useExtended=0, fmt=0x4082f1 "", ap=0x7fffffffcdf8) at sqlite3.c:19449
#3  0x00007ffff7f91754 in sqlite3_vsnprintf (n=0, zBuf=0x0, zFormat=0x9
<Address 0x9 out of bounds>, ap=ap@entry=0x7fffffffcdf8) at sqlite3.c:20140
#4  0x00007ffff7f917e8 in sqlite3_snprintf (n=n@entry=20,
zBuf=zBuf@entry=0x40b4a0 <mainPrompt> "", zFormat=zFormat@entry=0x4082e9
"sqlite> ") at sqlite3.c:20147
#5  0x00000000004063f5 in main_init (data=0x7fffffffcef8) at shell.c:2845
#6  main (argc=2, argv=0x7fffffffe558) at shell.c:2864

-O2 or -O3 are fine.



More information about the Gcc-bugs mailing list