public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree
@ 2010-10-03 20:56 dcb314 at hotmail dot com
2010-10-03 22:05 ` [Bug middle-end/45877] [4.6 Regression] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2010-10-03 20:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45877
Summary: invalid write in gimplify_and_update_call_from_tree
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
Created attachment 21951
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=21951
gzipped C++ source code
I just tried to compile package freefem++-3.9-1 with the latest 4.6
snapshot 20101002 on a Fedora Linux box. The compiler said
array_long.cpp:127:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
valgrind said
==4313== Invalid write of size 4
==4313== at 0xD03AFC: gimplify_and_update_call_from_tree (gimple.h:1193)
==4313== by 0xD05440: fold_gimple_call (gimple-fold.c:1505)
==4313== by 0xD05AFB: fold_stmt_1 (gimple-fold.c:1581)
==4313== by 0xA074EC: substitute_and_fold (tree-ssa-propagate.c:1135)
==4313== by 0x9A7DEC: do_ssa_ccp (tree-ssa-ccp.c:885)
==4313== by 0x87040E: execute_one_pass (passes.c:1569)
==4313== by 0x8706A4: execute_pass_list (passes.c:1624)
==4313== by 0x8706B6: execute_pass_list (passes.c:1625)
==4313== by 0x86F91B: do_per_function_toporder (passes.c:1160)
==4313== by 0x870B55: execute_ipa_pass_list (passes.c:1941)
==4313== by 0xB09B07: cgraph_optimize (cgraphunit.c:1699)
==4313== by 0xB09CC9: cgraph_finalize_compilation_unit (cgraphunit.c:1020)
==4313== Address 0x8 is not stack'd, malloc'd or (recently) free'd
==4313==
Source code attached. Flag -O2 required.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/45877] [4.6 Regression] invalid write in gimplify_and_update_call_from_tree
2010-10-03 20:56 [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree dcb314 at hotmail dot com
@ 2010-10-03 22:05 ` rguenth at gcc dot gnu.org
2010-10-04 0:13 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-03 22:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45877
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.10.03 22:05:15
Component|c++ |middle-end
Target Milestone|--- |4.6.0
Summary|invalid write in |[4.6 Regression] invalid
|gimplify_and_update_call_fr |write in
|om_tree |gimplify_and_update_call_fr
| |om_tree
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-03 22:05:15 UTC ---
Confirmed.
Program received signal SIGSEGV, Segmentation fault.
0x08d346f7 in gimple_set_location (g=0x0, location=5224648)
at /home/richard/src/trunk/gcc/gimple.h:1193
1193 g->gsbase.location = location;
(gdb) up
#1 0x08d3bd79 in gimplify_and_update_call_from_tree (si_p=0xbffff040,
expr=0xb4d644a0) at /home/richard/src/trunk/gcc/gimple-fold.c:1016
1016 gimple_set_location (new_stmt, gimple_location (stmt));
(gdb) p new_stmt
$1 = (gimple) 0x0
(gdb) p stmt
$2 = (gimple) 0xb5a5accc
(gdb) call debug_gimple_stmt (stmt)
# .MEM = VDEF <.MEM>
memcpy (&<retval>, &D.131677, 1);
(gdb) call debug_generic_expr (expr)
MEM[(char * {ref-all})&<retval>] = MEM[(char * {ref-all})&D.131677]
that new last handling looks like the problem.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/45877] [4.6 Regression] invalid write in gimplify_and_update_call_from_tree
2010-10-03 20:56 [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree dcb314 at hotmail dot com
2010-10-03 22:05 ` [Bug middle-end/45877] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2010-10-04 0:13 ` hjl.tools at gmail dot com
2010-10-04 8:50 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-04 0:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45877
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-04 00:13:05 UTC ---
It is triggered by revision 161655:
http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00006.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/45877] [4.6 Regression] invalid write in gimplify_and_update_call_from_tree
2010-10-03 20:56 [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree dcb314 at hotmail dot com
2010-10-03 22:05 ` [Bug middle-end/45877] [4.6 Regression] " rguenth at gcc dot gnu.org
2010-10-04 0:13 ` hjl.tools at gmail dot com
@ 2010-10-04 8:50 ` rguenth at gcc dot gnu.org
2010-10-05 10:37 ` rguenth at gcc dot gnu.org
2010-10-05 10:37 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-04 8:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45877
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-04 08:50:40 UTC ---
Yeah. I might as well take it then.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/45877] [4.6 Regression] invalid write in gimplify_and_update_call_from_tree
2010-10-03 20:56 [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree dcb314 at hotmail dot com
` (3 preceding siblings ...)
2010-10-05 10:37 ` rguenth at gcc dot gnu.org
@ 2010-10-05 10:37 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-05 10:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45877
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-05 10:37:42 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/45877] [4.6 Regression] invalid write in gimplify_and_update_call_from_tree
2010-10-03 20:56 [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree dcb314 at hotmail dot com
` (2 preceding siblings ...)
2010-10-04 8:50 ` rguenth at gcc dot gnu.org
@ 2010-10-05 10:37 ` rguenth at gcc dot gnu.org
2010-10-05 10:37 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-05 10:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45877
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-05 10:37:15 UTC ---
Author: rguenth
Date: Tue Oct 5 10:37:12 2010
New Revision: 164984
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164984
Log:
2010-10-05 Richard Guenther <rguenther@suse.de>
PR middle-end/45877
* gimple-fold.c (gimplify_and_update_call_from_tree): Handle
case where gimplification optimizes away the stmt.
* g++.dg/torture/pr45877.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr45877.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-05 10:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-03 20:56 [Bug c++/45877] New: invalid write in gimplify_and_update_call_from_tree dcb314 at hotmail dot com
2010-10-03 22:05 ` [Bug middle-end/45877] [4.6 Regression] " rguenth at gcc dot gnu.org
2010-10-04 0:13 ` hjl.tools at gmail dot com
2010-10-04 8:50 ` rguenth at gcc dot gnu.org
2010-10-05 10:37 ` rguenth at gcc dot gnu.org
2010-10-05 10:37 ` rguenth 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).