public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/18255] New: Protocols are not initialized correctly
@ 2004-10-31 17:13 tilo at pruetz dot net
2004-10-31 18:45 ` [Bug libobjc/18255] " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: tilo at pruetz dot net @ 2004-10-31 17:13 UTC (permalink / raw)
To: gcc-bugs
Given this small Objective-C program:
<SNIP>
#include <objc/Protocol.h>
@protocol a
- aMethod;
@end
@protocol b <a>
- bMethod;
@end
int main(int argc, char **argv)
{
if ([@protocol(b) descriptionForInstanceMethod: @selector(aMethod)] != NULL)
printf("Ok\n");
}
</SNIP>
Compiling with
gcc -lobjc
Running
a.out
-> Segmentation fault
The segfault occurs in the libobjc when the Protocol tries to check it's
parents. The 'protocols'-Array contains a pointer which does _not_ point to the
parent protocol! That's why the prog crashes.
When inserting the line
if ([@protocol(a) descriptionForInstanceMethod: @selector(aMethod)] != NULL)
printf("Ok\n");
as first line in the main-method all is good. The protocol 'a' (the parent) is
initialized and 'b' finds it's parent and the line that caused the crash before
is running without problems.
This is extremly critical to me and maybe a patch could be posted here so I can
patch my gcc?
P.S.: I set the component to 'libobjc' because I think that it's containing the
objc-runtime. Is this correct?
--
Summary: Protocols are not initialized correctly
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: libobjc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tilo at pruetz dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libobjc/18255] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
@ 2004-10-31 18:45 ` pinskia at gcc dot gnu dot org
2004-10-31 19:06 ` [Bug objc/18255] [GNU runtime] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 18:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
2004-10-31 18:45 ` [Bug libobjc/18255] " pinskia at gcc dot gnu dot org
@ 2004-10-31 19:06 ` pinskia at gcc dot gnu dot org
2004-10-31 19:10 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 19:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-31 19:06 -------
Confirmed, the problem is in the front-end, not marking the protocol a for being initialization.
Note this only effects the GNU runtime.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|libobjc |objc
Ever Confirmed| |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-10-31 19:06:16
date| |
Summary|Protocols are not |[GNU runtime] Protocols are
|initialized correctly |not initialized correctly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
2004-10-31 18:45 ` [Bug libobjc/18255] " pinskia at gcc dot gnu dot org
2004-10-31 19:06 ` [Bug objc/18255] [GNU runtime] " pinskia at gcc dot gnu dot org
@ 2004-10-31 19:10 ` pinskia at gcc dot gnu dot org
2004-10-31 19:26 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 19:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-31 19:10 -------
L_OBJC_PROTOCOL_a should be added to L_OBJC_STATIC_INSTANCES.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (2 preceding siblings ...)
2004-10-31 19:10 ` pinskia at gcc dot gnu dot org
@ 2004-10-31 19:26 ` pinskia at gcc dot gnu dot org
2004-10-31 22:47 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 19:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-31 19:26 -------
The bug is in objc_build_protocol_expr, I will figure out how to fix this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (3 preceding siblings ...)
2004-10-31 19:26 ` pinskia at gcc dot gnu dot org
@ 2004-10-31 22:47 ` pinskia at gcc dot gnu dot org
2004-10-31 22:49 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 22:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-31 22:47 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg02773.html>. I don't know if it applies
to the 3.4 branch at all. And don't know if this is a regression (I will check tomorrow).
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (4 preceding siblings ...)
2004-10-31 22:47 ` pinskia at gcc dot gnu dot org
@ 2004-10-31 22:49 ` pinskia at gcc dot gnu dot org
2004-11-22 17:36 ` tilo at pruetz dot net
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 22:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (5 preceding siblings ...)
2004-10-31 22:49 ` pinskia at gcc dot gnu dot org
@ 2004-11-22 17:36 ` tilo at pruetz dot net
2004-12-12 4:33 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tilo at pruetz dot net @ 2004-11-22 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tilo at pruetz dot net 2004-11-22 17:36 -------
Will this get fixed in the 3.4 branch?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (6 preceding siblings ...)
2004-11-22 17:36 ` tilo at pruetz dot net
@ 2004-12-12 4:33 ` pinskia at gcc dot gnu dot org
2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
2005-10-01 9:02 ` tilo at pruetz dot net
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-12 4:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-12 04:33 -------
Most likely not as I think it was broke with 2.95.3 also (but I have to check). I also need to update the
patch for the comments.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|patch |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (7 preceding siblings ...)
2004-12-12 4:33 ` pinskia at gcc dot gnu dot org
@ 2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
2005-10-01 9:02 ` tilo at pruetz dot net
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-03 13:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-03 13:50 -------
*** Bug 23214 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jeremy at deadbeef dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug objc/18255] [GNU runtime] Protocols are not initialized correctly
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
` (8 preceding siblings ...)
2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
@ 2005-10-01 9:02 ` tilo at pruetz dot net
9 siblings, 0 replies; 11+ messages in thread
From: tilo at pruetz dot net @ 2005-10-01 9:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tilo at pruetz dot net 2005-10-01 09:01 -------
Is there any hope that this bug will be fixed in a GCC release?
It really sucks to have to patch every new installed release.
What can I do to make the fix do it's way into a GCC release?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18255
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-10-01 9:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-31 17:13 [Bug libobjc/18255] New: Protocols are not initialized correctly tilo at pruetz dot net
2004-10-31 18:45 ` [Bug libobjc/18255] " pinskia at gcc dot gnu dot org
2004-10-31 19:06 ` [Bug objc/18255] [GNU runtime] " pinskia at gcc dot gnu dot org
2004-10-31 19:10 ` pinskia at gcc dot gnu dot org
2004-10-31 19:26 ` pinskia at gcc dot gnu dot org
2004-10-31 22:47 ` pinskia at gcc dot gnu dot org
2004-10-31 22:49 ` pinskia at gcc dot gnu dot org
2004-11-22 17:36 ` tilo at pruetz dot net
2004-12-12 4:33 ` pinskia at gcc dot gnu dot org
2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
2005-10-01 9:02 ` tilo at pruetz dot net
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).