public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "matz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug objc/36610] objc_msg_sendv is broken for targets which pass argument via registers Date: Thu, 12 Feb 2009 11:32:00 -0000 [thread overview] Message-ID: <20090212113201.31048.qmail@sourceware.org> (raw) In-Reply-To: <bug-36610-16372@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from matz at gcc dot gnu dot org 2009-02-12 11:32 ------- I don't think it's __builtin_apply which is wrong. It's rather how it is used in libobjc. In particular register parameters are handled wrongly. libobjc objc_msg_sendv() simply tries to overwrite the first two argument slots returned by __builtin_apply_args (called in a different routine) with those it really wants in there. It uses method_get_{first,next}_argument for that which tries to use the argument pointer in that memory block. But memory pointed to by that arg pointer only contains the args passed on stack. Those passed in registers lie somewhere else (in the block returned by builtin_apply_args, but behind the arg pointer), in register order (not in argument order!). So, overwriting the argument slots doesn't actually overwrite the data which later is used in __builtin_apply --> boom. Accordingly changing the summary. -- matz at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |objc Summary|__builtin_apply is broken |objc_msg_sendv is broken for |for targets which pass |targets which pass argument |argument via registers |via registers http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36610
next prev parent reply other threads:[~2009-02-12 11:32 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-06-24 1:48 [Bug objc/36610] New: message forwarding broken on x86_64: self is not receiver hydrologiccycle at gmail dot com 2008-06-24 1:53 ` [Bug libobjc/36610] " pinskia at gcc dot gnu dot org 2008-12-29 2:19 ` pinskia at gcc dot gnu dot org 2009-01-01 16:24 ` pinskia at gcc dot gnu dot org 2009-01-01 16:26 ` [Bug middle-end/36610] __builtin_apply is broken for targets which pass argument via registers pinskia at gcc dot gnu dot org 2009-01-01 16:27 ` hjl dot tools at gmail dot com 2009-02-12 11:32 ` matz at gcc dot gnu dot org [this message] 2009-03-27 16:52 ` [Bug objc/36610] objc_msg_sendv " ghazi at gcc dot gnu dot org 2009-03-27 16:55 ` ghazi at gcc dot gnu dot org 2009-03-27 17:38 ` dave at hiauly1 dot hia dot nrc dot ca 2009-03-31 19:12 ` ghazi at gcc dot gnu dot org 2009-03-31 19:34 ` [Bug libobjc/36610] " pinskia at gcc dot gnu dot org 2009-03-31 20:28 ` janis at gcc dot gnu dot org 2009-04-09 16:59 ` janis at gcc dot gnu dot org 2009-04-09 17:02 ` janis at gcc dot gnu dot org 2009-04-19 15:52 ` pinskia at gcc dot gnu dot org 2010-02-24 11:56 ` ro at gcc dot gnu dot org 2010-06-02 17:17 ` ro at gcc dot gnu dot 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=20090212113201.31048.qmail@sourceware.org \ --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: linkBe 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).