public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
@ 2012-11-09 18:12 markus at trippelsdorf dot de
2012-11-11 9:22 ` [Bug tree-optimization/55253] " markus at trippelsdorf dot de
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: markus at trippelsdorf dot de @ 2012-11-09 18:12 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
@ 2012-11-11 9:22 ` markus at trippelsdorf dot de
2012-11-12 12:03 ` jamborm at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: markus at trippelsdorf dot de @ 2012-11-11 9:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-11-11 09:22:12 UTC ---
Reduced:
markus@x4 /tmp % cat test.i
struct
{
int mallocFailed;
}
*a;
struct StrAccum
{
int useMalloc;
}
b, c;
static void
fn1 (struct StrAccum *p1, int p2)
{
if (p2 == 0)
return;
if (p1->useMalloc)
a->mallocFailed = 0;
}
void
fn2 (struct StrAccum *p1)
{
fn1 (p1, 1);
}
void
fn3 (struct StrAccum *p1)
{
fn1 (p1, 1);
}
void
fn4 ()
{
c.useMalloc = 1;
fn1 (&c, 0);
}
int
main ()
{
fn3 (&b);
return 0;
}
markus@x4 /tmp % gcc -Os test.i && ./a.out
[1] 25665 segmentation fault ./a.out
markus@x4 /tmp % gcc -O2 test.i && ./a.out
markus@x4 /tmp %
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
2012-11-11 9:22 ` [Bug tree-optimization/55253] " markus at trippelsdorf dot de
@ 2012-11-12 12:03 ` jamborm at gcc dot gnu.org
2012-11-13 14:27 ` jamborm at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-11-12 12:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-11-12
AssignedTo|unassigned at gcc dot |jamborm at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-12 12:03:12 UTC ---
Confirmed and mine, thanks a lot for the reduced testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
2012-11-11 9:22 ` [Bug tree-optimization/55253] " markus at trippelsdorf dot de
2012-11-12 12:03 ` jamborm at gcc dot gnu.org
@ 2012-11-13 14:27 ` jamborm at gcc dot gnu.org
2012-11-13 14:31 ` jamborm at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-11-13 14:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ian at airs dot com
--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-13 14:26:51 UTC ---
*** Bug 55305 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
` (2 preceding siblings ...)
2012-11-13 14:27 ` jamborm at gcc dot gnu.org
@ 2012-11-13 14:31 ` jamborm at gcc dot gnu.org
2012-11-13 17:05 ` jamborm at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-11-13 14:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-13 14:31:23 UTC ---
Created attachment 28675
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28675
Fix
I am currently bootstrapping this fix. I'll submit it to the mailing list if
all goes fine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
` (3 preceding siblings ...)
2012-11-13 14:31 ` jamborm at gcc dot gnu.org
@ 2012-11-13 17:05 ` jamborm at gcc dot gnu.org
2012-11-13 18:56 ` jamborm at gcc dot gnu.org
2012-11-14 14:02 ` jamborm at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-11-13 17:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2012-11/msg01008.htm
| |l
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-13 17:05:06 UTC ---
I have submitted a fix to the mailing list:
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01008.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
` (4 preceding siblings ...)
2012-11-13 17:05 ` jamborm at gcc dot gnu.org
@ 2012-11-13 18:56 ` jamborm at gcc dot gnu.org
2012-11-14 14:02 ` jamborm at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-11-13 18:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-13 18:56:27 UTC ---
Author: jamborm
Date: Tue Nov 13 18:56:24 2012
New Revision: 193484
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193484
Log:
2012-11-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/55253
* ipa-cp.c (merge_aggregate_lattices): Propagate aggs_contain_variable
flag.
* testsuite/gcc.dg/torture/pr55253.c: New test.
* testsuite/gcc.dg/torture/pr55305.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr55253.c
trunk/gcc/testsuite/gcc.dg/torture/pr55305.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
` (5 preceding siblings ...)
2012-11-13 18:56 ` jamborm at gcc dot gnu.org
@ 2012-11-14 14:02 ` jamborm at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-11-14 14:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-11-14 14:02:26 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-14 14:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-09 18:12 [Bug tree-optimization/55253] New: [4.8 Regression] Revision 193298 miscompiles sqlite with -Os markus at trippelsdorf dot de
2012-11-11 9:22 ` [Bug tree-optimization/55253] " markus at trippelsdorf dot de
2012-11-12 12:03 ` jamborm at gcc dot gnu.org
2012-11-13 14:27 ` jamborm at gcc dot gnu.org
2012-11-13 14:31 ` jamborm at gcc dot gnu.org
2012-11-13 17:05 ` jamborm at gcc dot gnu.org
2012-11-13 18:56 ` jamborm at gcc dot gnu.org
2012-11-14 14:02 ` jamborm at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).