public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/51662] New: Temporary objects gets garbage collected in cc1
@ 2011-12-23 10:35 max at duempel dot org
  2011-12-23 10:41 ` [Bug other/51662] " max at duempel dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: max at duempel dot org @ 2011-12-23 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51662
           Summary: Temporary objects gets garbage collected in cc1
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: max@duempel.org


Created attachment 26170
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26170
Workaround

After rebasing cegcc/mingw32ce on gcc 4.6.2, I found cc1 crashing.
locate_fn_flags() creates an object "ob" that is not yet inserted into the root
tree, and lookup_fnfields() eventually causes a garbage collection. This may
kill the page where "ob" lives in, causing a segmentation fault.

I found a kludge to work around it: I increase function_depth to inhibit
garbage collection. See attached patch.

Another idea would be to call lookup_fnfields() before allocating "ob", but
since I don't know the code base, I don't know if this is safe.

Also note that this may or may not be caused / triggered by cegcc specific
patches. Just in case you want to review these:
http://git.xcsoar.org/cgit/max/cegcc-gcc.git/log/?h=ice


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

end of thread, other threads:[~2012-11-29 22:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-23 10:35 [Bug other/51662] New: Temporary objects gets garbage collected in cc1 max at duempel dot org
2011-12-23 10:41 ` [Bug other/51662] " max at duempel dot org
2011-12-23 19:15 ` pinskia at gcc dot gnu.org
2011-12-30  6:34 ` pinskia at gcc dot gnu.org
2012-07-30 23:25 ` steven at gcc dot gnu.org
2012-07-31  0:59 ` [Bug c++/51662] Temporary objects gets garbage collected in cc1plus jason at gcc dot gnu.org
2012-09-13 14:53 ` jason at gcc dot gnu.org
2012-11-29 21:58 ` jason at gcc dot gnu.org
2012-11-29 22:08 ` jason 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).