public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/39817]  New: objc_msg_sendv crashes on AMD64
@ 2009-04-19 15:40 js-gcc at webkeks dot org
  2009-04-19 15:52 ` [Bug libobjc/39817] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: js-gcc at webkeks dot org @ 2009-04-19 15:40 UTC (permalink / raw)
  To: gcc-bugs

On AMD64, using objc_msg_sendv leads to a segfault. This is because libobjc
uses __builtin_return in objc_msg_sendv, which is broken on AMD64. I'm not sure
whether I should create another bug that it's broken on AMD64 or if I should
just report it as a bug in libobjc.

The workaround would be to use libffi in objc_msg_sendv.

This bug renders libobjc pretty useless on AMD64, because forwarding is used a
lot in objc and each time you forward something, it just crashes. This is the
reason why I chose blocker as severity, it makes libobjc completely useless on
AMD64. And I'm pretty sure this affects other architectures as well.

The backtrace is:
#0  0x0000000000600c30 in _OBJC_SELECTOR_TABLE ()
#1  0x0000000000000000 in ?? ()

If you change objc_msg_sendv to not use __builtin_return but instead return for
example NULL, it works (though of course the return value is wrong).

I really recommend getting this fixed for the next 4.3 release. Objc support is
unusable as it is on AMD64 atm.

I'm confused that none of the GNustep guys reported this before, but I remember
that they're using libffi somewhere, so most likely they'll use it here as
well.


-- 
           Summary: objc_msg_sendv crashes on AMD64
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: js-gcc at webkeks dot org
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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


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

* [Bug libobjc/39817] objc_msg_sendv crashes on AMD64
  2009-04-19 15:40 [Bug libobjc/39817] New: objc_msg_sendv crashes on AMD64 js-gcc at webkeks dot org
@ 2009-04-19 15:52 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-19 15:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-04-19 15:52 -------
>I really recommend getting this fixed for the next 4.3 release.
Considering this has always been broken since the first release of libobjc
which supported a target that passed via registers (aka have always been broken
since the first release :) ), this is not going to be fixed until at least 4.5
now since 4.3 and 4.4 are both in regression only mode (aka release mode).

*** This bug has been marked as a duplicate of 36610 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2009-04-19 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-19 15:40 [Bug libobjc/39817] New: objc_msg_sendv crashes on AMD64 js-gcc at webkeks dot org
2009-04-19 15:52 ` [Bug libobjc/39817] " pinskia 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).