[bug #29338] Crash using @synchronized on Windows

2010-08-20 Thread Richard Frith-Macdonald

Follow-up Comment #6, bug #29338 (project gnustep):

sync.m in libnobjc2 in svn trunk is broken at the latest revision:

It uses objc_disposeClassPair() ... which cannot work with the gnu runtime
(ie can't be ported into ObjectiveC2 in base), and as far as I can see does
not fully work in libobjc2 (though there we have enough internals access to
fix it).

It doesn't align the mutex (which I recently found means that it will fail on
hppa machines unless by chance the mutex falls on a 16 byte boundary).

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #29338] Crash using @synchronized on Windows

2010-08-20 Thread Gregory John Casamento

Follow-up Comment #5, bug #29338 (project gnustep):

I thought David had fixed this in his most recent version of sync.m for the
libobjc2 runtime.  This is acceptable for now, but I'll take a look into
backporting David's changes into ObjectiveC2 under base. 

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #30766] Serious problems on hppa -- all programs abort with malloc assertion failure

2010-08-20 Thread Yavor Doganov

Follow-up Comment #21, bug #30766 (project gnustep):

Yes, I'm glad to confirm this fixes the problem.  It was not tested on the
official autobilders yet, but I doubt there will be any problems (and if there
are, they would be entirely my fault when incorporating the patch).

Thanks very much!

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #29338] Crash using @synchronized on Windows

2010-08-20 Thread Richard Frith-Macdonald

Update of bug #29338 (project gnustep):

  Status:None => Fixed  
 Open/Closed:Open => In Test

___

Follow-up Comment #4:

I looked into it, and it seems that the new sync.m just can't work
reliably/properly because it depends on unregistering classes (not supported
by the underlying runtime).
The workaround would be to simply leak the classes and never unregister them
... probably not acceptable.
This code also incorrectly assumes that it has the mutex allocated in
correctly aligned memory ... which is fixable if a little messy.

I replaced sync.m with Greg's original version which, while much slower,
should actually work reliably.  In future, we could use a hashtable to improve
performance somewhat if we want to.

I also modified the library to warn about bad/unsafe usage of
objc_disposeClassPair() and objc_registerClassPair()

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep