public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "max at duempel dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/51662] New: Temporary objects gets garbage collected in cc1
Date: Fri, 23 Dec 2011 10:35:00 -0000	[thread overview]
Message-ID: <bug-51662-4@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2011-12-23 10:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23 10:35 max at duempel dot org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-51662-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).