public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15248] New: Reload may generate stores to read-only memory
@ 2004-05-02 13:01 ebotcazou at gcc dot gnu dot org
  2004-05-02 14:04 ` [Bug optimization/15248] " pinskia at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-05-02 13:01 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2005-08-29 15:07 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-02 13:01 [Bug optimization/15248] New: Reload may generate stores to read-only memory ebotcazou at gcc dot gnu dot org
2004-05-02 14:04 ` [Bug optimization/15248] " pinskia at gcc dot gnu dot org
2004-09-17 10:38 ` [Bug rtl-optimization/15248] " steven at gcc dot gnu dot org
2004-09-19 13:13 ` ebotcazou at gcc dot gnu dot org
2005-01-31  6:52 ` pinskia at gcc dot gnu dot org
2005-04-19  6:54 ` ebotcazou at gcc dot gnu dot org
2005-04-19 10:04 ` [Bug rtl-optimization/15248] [4.0/4.1 Regression] " giovannibajo at libero dot it
2005-04-20 17:05 ` ebotcazou at gcc dot gnu dot org
2005-04-30 22:10 ` [Bug rtl-optimization/15248] [4.0 " ebotcazou at gcc dot gnu dot org
2005-05-03 19:25 ` law at redhat dot com
2005-05-03 19:35 ` mark at codesourcery dot com
2005-05-07 16:52 ` ebotcazou at gcc dot gnu dot org
2005-05-09  0:20 ` mark at codesourcery dot com
2005-05-17 17:04 ` law at redhat dot com
2005-07-06 16:41 ` mmitchel at gcc dot gnu dot org
2005-07-06 16:48 ` law at redhat dot com
2005-07-07 10:19 ` ebotcazou at gcc dot gnu dot org
2005-08-18  9:51 ` bonzini at gcc dot gnu dot org
2005-08-22 16:47 ` mmitchel at gcc dot gnu dot org
2005-08-29 15:05 ` bonzini at gcc dot gnu dot org
2005-08-29 15:16 ` cvs-commit at gcc dot gnu dot 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).