This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/51662] New: Temporary objects gets garbage collected in cc1
- From: "max at duempel dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2011 10:34:02 +0000
- Subject: [Bug other/51662] New: Temporary objects gets garbage collected in cc1
- Auto-submitted: auto-generated
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