[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #29338] Crash using @synchronized on Windows
From: |
Doug Simons |
Subject: |
[bug #29338] Crash using @synchronized on Windows |
Date: |
Thu, 25 Mar 2010 23:29:28 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10 |
URL:
<http://savannah.gnu.org/bugs/?29338>
Summary: Crash using @synchronized on Windows
Project: GNUstep
Submitted by: theeggcamefirst
Submitted on: Thu 25 Mar 2010 11:29:28 PM GMT
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This only occurs when creating a lock for the *second* instance of our class,
after the first instance has been deallocated.
Here's a backtrace that shows where it dies (stepping through code in
sync.m):
78 class_addMethod(lockClass, @selector(dealloc),
(IMP)deallocLockClass, types);
(gdb) n
80 if (!class_isMetaClass(obj->isa))
(gdb)
82 objc_registerClassPair(lockClass);
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x67844a2a in objc-1!__objc_resolve_class_links () from
c:\GNUstep\GNUstep\System\Tools\objc-1.dll
(gdb) bt
#0 0x67844a2a in objc-1!__objc_resolve_class_links ()
from c:\GNUstep\GNUstep\System\Tools\objc-1.dll
#1 0x65ac71f5 in objc_registerClassPair (cls=0x9dad9b0) at runtime.c:1002
#2 0x65ac7c7c in initLockObject (obj=0x99cbad0) at sync.m:82
#3 0x65ac7d9e in objc_sync_enter (obj=0x99cbad0) at sync.m:124
#4 0x00476425 in -[VNCConnection setStatusString:] (self=0x99cbad0,
_cmd=0x54e6b0,
aString=0x9b7e610) at VNCConnection.m:4449
I've committed a temporary fix for this, that simply removes the call to
objc_disposeClassPair() in the deallocLockClass() function. Apparently the
runtime can't handle disposing of a class and then creating a new class with
the same superclass as the one that went away. I don't know if this is a
Windows-specific problem or if it is an issue on Linux as well.
David, I understand from talking to Greg that you're the one who knows this
stuff. If you have any questions about what's going on, give Greg a call.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?29338>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #29338] Crash using @synchronized on Windows,
Doug Simons <=