discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please test pending bugfix release of base


From: Quentin Mathé
Subject: Re: Please test pending bugfix release of base
Date: Sat, 18 Jun 2011 17:07:24 +0200

Le 16 juin 2011 à 09:58, Richard Frith-Macdonald a écrit :

> It's long enough now since the last release that I'd like to make a bugfix 
> release of the base library (going from 1.22.0 to 1.22.1).
> This release is mostly for portability issues, but there are fixes to atomic 
> operations used for retain/release safety, which would be important to 
> threaded software, so we really should make a release for tis alone.
> The idea is not to add any new features, just to make things even more 
> reliable and portable.
> 
> Please could people (especially those with unusual hardware and/or 
> obscure/old operating systems) give this a try so we can make this release as 
> portable and reliable as possible.
> 
> You can get hold of the pre-release code using subversion from 
> svn://svn.gna.org/svn/gnustep/libs/base/branches/stable
> If there is anyone who really can't use subversion but would like to try 
> this, please let me know and I'll send you a .tar.gz archive of the source 
> (approx 3MB email).

I found a bug with NS(Concrete)PointerFunctions, it looks a bit weird. So I'm 
not entirely sure it's a bug in GNUstep Base.
I'm using GNUstep Base from trunk (r33310), libobjc2 (the lastest revision) 
from trunk. Everything is compiled with Clang 2.9 on Ubuntu 10.4 x86 (32 bits).

As visible with the test tool when run inside GDB, -initWithOptions: receives a 
completely corrupted arguments (including self), but returns a valid self, so 
the issue is not visible until much later (when pointerFunctionsXXX() are 
called).  
For example… If I create a NSMapTable initialized to accept raw pointers, when 
a raw pointer is inserted as an object, the wrong acquireFunction is called and 
a crash occurs.

At first sight, I also see no problems when invoking  methods other than 
-initWithOptions: on NS(Concrete)PointerFunctions. 

The test program is available in attachment, here is a debug session that shows 
how -initWithOptions: goes wrong:

[Thread debugging using libthread_db enabled]
[New Thread 0xb7fe0b70 (LWP 16396)]
2011-06-18 16:32:23.318 pfunc-issue[16393]  ---> Alloc 
<NSConcretePointerFunctions: 0x80f4c50>
2011-06-18 16:32:23.322 pfunc-issue[16393]  ---> Init 
<NSConcretePointerFunctions: 0x80f4c50>
2011-06-18 16:32:23.322 pfunc-issue[16393]  ---> Alloc 
<NSConcretePointerFunctions: 0x80f4c50>

Breakpoint 1, -[NSConcretePointerFunctions initWithOptions:] (self=0x2, 
_cmd=0x804b310, 
    options=135220304) at NSConcretePointerFunctions.m:188
^^^^^^^^^^^^^^^^^^^^^
188     - (id) initWithOptions: (NSPointerFunctionsOptions)options
(gdb) bt
#0  -[NSConcretePointerFunctions initWithOptions:] (self=0x2, _cmd=0x804b310, 
    options=135220304) at NSConcretePointerFunctions.m:188
#1  0x08048ae6 in main (argc=1, argv=0xbffff4e4) at pfunc-issue.m:20
(gdb) c
Continuing.
2011-06-18 16:32:39.863 pfunc-issue[16393]  ---> InitWithOptions: 
<NSConcretePointerFunctions: 0x80f4c50>
[Thread 0xb7fe0b70 (LWP 16396) exited]

Any idea?

Cheers,
Quentin.

Attachment: pfunc-issue.m
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]