This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15248] New: Reload may generate stores to read-only memory
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2004 13:01:49 -0000
- Subject: [Bug optimization/15248] New: Reload may generate stores to read-only memory
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Under certain circumstances, the reload pass may generate stores to read-only
memory, thus producing executables that will segfault at run time.
The pattern is the following: a REG_EQUAL note in a set of a pseudo containing a
MEM/u is promoted by local-alloc to a REG_EQUIV note; during reload, the pseudo
doesn't get a hard reg so is replaced by its equivalent memory location as the
destination of the set.
This had affected the 3.3 branch (PR opt/13634, opt/13472, opt/14529) and the
3.4 branch (PR opt/15112), and was fixed by not recording MEM/u as equivalent
memory locations for pseudos altogether.
More sophisticated solutions can probably be devised so as to avoid the
unnecessary spills to the frame that are currently produced.
--
Summary: Reload may generate stores to read-only memory
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ebotcazou at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: *-*-*
GCC host triplet: *-*-*
GCC target triplet: *-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15248