public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases
@ 2005-08-03 13:38 jeremy at deadbeef dot com
  2005-08-03 13:39 ` [Bug libobjc/23214] " jeremy at deadbeef dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: jeremy at deadbeef dot com @ 2005-08-03 13:38 UTC (permalink / raw)
  To: gcc-bugs

I have a test case and a patch that fixes this.  I found the problem on 
mingw32 but I believe that this will be a problem on every platform, and for 
every version of gcc (gnu Objc runtime only).

I will attempt to attach the testcase and patch.

-- 
           Summary: libobjc doesn't initialize protocols in some cases
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jeremy at deadbeef dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: mingw32
  GCC host triplet: mingw32
GCC target triplet: mingw32


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
  2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
@ 2005-08-03 13:39 ` jeremy at deadbeef dot com
  2005-08-03 13:41 ` jeremy at deadbeef dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: jeremy at deadbeef dot com @ 2005-08-03 13:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jeremy at deadbeef dot com  2005-08-03 13:39 -------
Created an attachment (id=9419)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9419&action=view)
Patch to init.c in libobjc to fix protocol problem.

This patch is relative to CVS.

-- 


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
  2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
  2005-08-03 13:39 ` [Bug libobjc/23214] " jeremy at deadbeef dot com
@ 2005-08-03 13:41 ` jeremy at deadbeef dot com
  2005-08-03 13:44 ` jeremy at deadbeef dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: jeremy at deadbeef dot com @ 2005-08-03 13:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jeremy at deadbeef dot com  2005-08-03 13:41 -------
Created an attachment (id=9420)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9420&action=view)
Test case #1

Complie like this
gcc -g protocolCase1.m -lobjc -o protocolCase1
then run the program and watch it crash.

-- 


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
  2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
  2005-08-03 13:39 ` [Bug libobjc/23214] " jeremy at deadbeef dot com
  2005-08-03 13:41 ` jeremy at deadbeef dot com
@ 2005-08-03 13:44 ` jeremy at deadbeef dot com
  2005-08-03 13:44 ` jeremy at deadbeef dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: jeremy at deadbeef dot com @ 2005-08-03 13:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jeremy at deadbeef dot com  2005-08-03 13:44 -------
Created an attachment (id=9422)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9422&action=view)
test case #2b

See attachment 9421.

-- 


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
  2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
                   ` (2 preceding siblings ...)
  2005-08-03 13:44 ` jeremy at deadbeef dot com
@ 2005-08-03 13:44 ` jeremy at deadbeef dot com
  2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
  2005-08-03 13:53 ` jeremy at deadbeef dot com
  5 siblings, 0 replies; 11+ messages in thread
From: jeremy at deadbeef dot com @ 2005-08-03 13:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jeremy at deadbeef dot com  2005-08-03 13:44 -------
Created an attachment (id=9421)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9421&action=view)
test case #2a

Requires the protocolCase2b.m attachment as well.

Compile using gcc -g protocolCase2b.m protocolCase2.m -lobjc -o protocolCase2
run the program and watch it crash.

Don't change the link order, 2b.m must occur before 2.m or it won't fail.

-- 


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
  2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
                   ` (3 preceding siblings ...)
  2005-08-03 13:44 ` jeremy at deadbeef dot com
@ 2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
  2005-08-03 13:53 ` jeremy at deadbeef dot com
  5 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 -------
This is a dup of bug 18255.  The bug is really in the front-end which should mark the supper protocol 
as be staticly initialized.

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

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


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
  2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
                   ` (4 preceding siblings ...)
  2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
@ 2005-08-03 13:53 ` jeremy at deadbeef dot com
  5 siblings, 0 replies; 11+ messages in thread
From: jeremy at deadbeef dot com @ 2005-08-03 13:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jeremy at deadbeef dot com  2005-08-03 13:52 -------
No no, it is not a duplicate.  You will see that test case #1 will still fail 
even after you fix bug 18255.  libobjc fails to initialize statics if the 
first static was initialized as a side effect of being used in a class.

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


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
       [not found] <bug-23214-4@http.gcc.gnu.org/bugzilla/>
  2010-10-13  8:17 ` nicola at gcc dot gnu.org
@ 2010-10-13  8:19 ` nicola at gcc dot gnu.org
  1 sibling, 0 replies; 11+ messages in thread
From: nicola at gcc dot gnu.org @ 2010-10-13  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nicola at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #10 from Nicola Pero <nicola at gcc dot gnu.org> 2010-10-13 08:18:58 UTC ---
Fixed in trunk and testcase added to the test suite.

Thanks


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
       [not found] <bug-23214-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-13  8:17 ` nicola at gcc dot gnu.org
  2010-10-13  8:19 ` nicola at gcc dot gnu.org
  1 sibling, 0 replies; 11+ messages in thread
From: nicola at gcc dot gnu.org @ 2010-10-13  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Nicola Pero <nicola at gcc dot gnu.org> 2010-10-13 08:16:44 UTC ---
Author: nicola
Date: Wed Oct 13 08:16:42 2010
New Revision: 165414

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165414
Log:
In libobjc/:
2010-10-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR libobjc/23214
        * init.c (objc_init_statics): Do not skip the initialization of a
        statics list if the first object has already been initialized; in
        the case of Protocols, while the first one may have been
        initialized, some others may not have been initialized yet.

In gcc/testsuite/:
2010-10-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR libobjc/23214
        * objc.dg/pr23214.m: New.

Added:
    trunk/gcc/testsuite/objc.dg/pr23214.m
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libobjc/ChangeLog
    trunk/libobjc/init.c


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
       [not found] <bug-23214-11110@http.gcc.gnu.org/bugzilla/>
  2010-09-08 17:48 ` nicola at gcc dot gnu dot org
@ 2010-09-08 17:52 ` nicola at gcc dot gnu dot org
  1 sibling, 0 replies; 11+ messages in thread
From: nicola at gcc dot gnu dot org @ 2010-09-08 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from nicola at gcc dot gnu dot org  2010-09-08 17:52 -------
Created an attachment (id=21743)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21743&action=view)
A tidied up testcase ready for the GCC testsuite


-- 

nicola at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #9420 is|0                           |1
           obsolete|                            |
Attachment #9421 is|0                           |1
           obsolete|                            |
Attachment #9422 is|0                           |1
           obsolete|                            |


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


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

* [Bug libobjc/23214] libobjc doesn't initialize protocols in some cases
       [not found] <bug-23214-11110@http.gcc.gnu.org/bugzilla/>
@ 2010-09-08 17:48 ` nicola at gcc dot gnu dot org
  2010-09-08 17:52 ` nicola at gcc dot gnu dot org
  1 sibling, 0 replies; 11+ messages in thread
From: nicola at gcc dot gnu dot org @ 2010-09-08 17:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from nicola at gcc dot gnu dot org  2010-09-08 17:48 -------
Confirmed.

Thanks


-- 

nicola at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-08 17:48:14
               date|                            |


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


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

end of thread, other threads:[~2010-10-13  8:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-03 13:38 [Bug libobjc/23214] New: libobjc doesn't initialize protocols in some cases jeremy at deadbeef dot com
2005-08-03 13:39 ` [Bug libobjc/23214] " jeremy at deadbeef dot com
2005-08-03 13:41 ` jeremy at deadbeef dot com
2005-08-03 13:44 ` jeremy at deadbeef dot com
2005-08-03 13:44 ` jeremy at deadbeef dot com
2005-08-03 13:50 ` pinskia at gcc dot gnu dot org
2005-08-03 13:53 ` jeremy at deadbeef dot com
     [not found] <bug-23214-11110@http.gcc.gnu.org/bugzilla/>
2010-09-08 17:48 ` nicola at gcc dot gnu dot org
2010-09-08 17:52 ` nicola at gcc dot gnu dot org
     [not found] <bug-23214-4@http.gcc.gnu.org/bugzilla/>
2010-10-13  8:17 ` nicola at gcc dot gnu.org
2010-10-13  8:19 ` 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).