public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/47922] New: [4.6 Regression] libobjc crashes with garbage collection in any real-life program
@ 2011-02-28 12:25 nicola at gcc dot gnu.org
  2011-02-28 14:12 ` [Bug libobjc/47922] " nicola at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-02-28 12:25 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] libobjc crashes with garbage
                    collection in any real-life program
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nicola@gcc.gnu.org


>From Richard Frith-Macdonald (rfm@gnu.org) --

> I enabled gc and built base using the new compiler runtime, but as soon as
> I start any program, it segfaults.
>
> It appears that a bug has crept in to the libobjc type encoding handling,
> so when you call class_ivar_set_gcinvisible() for any class, you get a crash.
>
> The crash is a divide by zero in objc_layout_structure_next_member()
> (at line 1278 desired_align is zero).
>
> I think the problem is that the exclamation mark denoting a weak variable
> is not being handled in the function.
> On line 1208 objc_skip_type_qualifiers() is not skipping past it, then
> on line 1211 objc_alignof_type() is returning zero.
>
> Looking at the ChangeLog, I think you broke this on 2010-09-26 changing 
> _C_GCINVISIBLE from '!' to '|' when parts of the code use a literal 
> exclamation mark rather than the symbolic constant.
>
> Is it too late to get this fixed?

gc.c line 427 replace three lines with:

         new_type[len++] = _C_GCINVISIBLE;
         strcpy (new_type + len, type);


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

* [Bug libobjc/47922] [4.6 Regression] libobjc crashes with garbage collection in any real-life program
  2011-02-28 12:25 [Bug libobjc/47922] New: [4.6 Regression] libobjc crashes with garbage collection in any real-life program nicola at gcc dot gnu.org
@ 2011-02-28 14:12 ` nicola at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: nicola at gcc dot gnu.org @ 2011-02-28 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

Nicola Pero <nicola at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0

--- Comment #1 from Nicola Pero <nicola at gcc dot gnu.org> 2011-02-28 13:13:19 UTC ---
Fixed in trunk (4.6.0).

Thanks


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

end of thread, other threads:[~2011-02-28 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-28 12:25 [Bug libobjc/47922] New: [4.6 Regression] libobjc crashes with garbage collection in any real-life program nicola at gcc dot gnu.org
2011-02-28 14:12 ` [Bug libobjc/47922] " nicola 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).