Bug#493250: [libgnustep-base1.16] NSInvocation breaks exception handling

2008-08-02 Thread Matthias Andreas Benkard
 Are there any differences between the way you compile
 GNUstep Base, and the way the package is built?  e.g. what flags do you
 pass to configure?

I compiled the stable GNUstep Startup by using the InstallGNUstep
script (installation to home directory), and the Subversion checkout
by calling compile-all with a --prefix parameter, having edited it so
as to call GNUstep make's configure script with
--with-config-file=whatever.

I assume, therefore, that my configuration is pretty much whatever the
configure scripts default to.


 Do you have libffi-dev installed?  With GNUstep Base 1.16.3, it will use
 libffi if it can find it, even if you say --enable-ffcall, unless you
 specifically say --disable-libffi.

I had noticed that as well, consequently done a make distclean and
removed libffi-dev before building anew.


 Anyways, this may all be moot, since you say it doesn't happen with
 libgnustep-base1.16-libffi.  After lenny is released, we will be
 defaulting to using libffi, since upstream prefers it now.  The reason
 we haven't switched yet is because we wouldn't be able to sufficiently
 test such a big change before the release of lenny

O.K.  The program I'm working on will possibly make direct use of
libffi instead of relying on NSInvocation eventually, anyway.  I guess
I'll just have to tell my users to install libgnustep-base1.16-libffi
for now.  (Of course, it'd be nice for it to work out of the box.)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#493250: [libgnustep-base1.16] NSInvocation breaks exception handling

2008-08-01 Thread Matthias Andreas Benkard
Package: libgnustep-base1.16
Version: 1.16.3-2
Severity: important

The program below, which does little more than raising an exception
from a method invoked by means of an NSInvocation object, crashes with
a SIGABRT by calling abort() from objc_exception_throw() as indicated
by the attached gdb output.

With either libgnustep-base1.16-libffi or a manually compiled stable
GNUstep Base (1.16.3), as well as with a current Subversion checkout
of GNUstep Base (both compiled using ffcall, not libffi), the program
instead handles the exception as intended:

~/Dokumente/Objective-C% obj/invocation_exception_test
2008-08-01 16:45:46.387 invocation_exception_test[16624] Oops.  An
exception has occurred.
~/Dokumente/Objective-C%

What follows are the program text and the output of gdb.

*** PROGRAM TEXT FOLLOWS ***

#import Foundation/Foundation.h

@interface  MLKInvocationExceptionTest : NSObject
+(void) test;
+(void) raiseException;
@end


@implementation MLKInvocationExceptionTest
+(void) test
{
  NSMethodSignature *sig = [self
methodSignatureForSelector:@selector(raiseException)];
  NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig];

  [invocation setTarget:self];
  [invocation setSelector:@selector(raiseException)];

  NS_DURING
{
  [invocation invoke];
}
  NS_HANDLER
{
  NSLog (@Oops.  An exception has occurred.);
}
  NS_ENDHANDLER;
}

+(void) raiseException
{
  [NSException raise:@MLKException
   format:@Something weird is going on.];
}
@end


int main (int argc, char **argv)
{
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  [MLKInvocationExceptionTest test];
  [pool release];
  return 0;
}

*** PROGRAM TEXT END ***

*** GDB TRANSCRIPT FOLLOWS ***

(gdb) run
Starting program: /home/mulk/Dokumente/Objective-C/obj/invocation_exception_test
[Thread debugging using libthread_db enabled]
[New Thread 0xb766d6b0 (LWP 24453)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb766d6b0 (LWP 24453)]
0xb7fd8424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fd8424 in __kernel_vsyscall ()
#1  0xb799a5e0 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb799bfb8 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb7b0de8f in objc_exception_throw (value=0x89cd5e8)
at /scratch/packages/gcc/4.3/gcc-4.3-4.3.1/src/libobjc/exception.c:375
#4  0xb7c884f4 in -[NSException raise] (self=0x89cd5e8, _cmd=0xb7f03940)
at NSException.m:827
#5  0xb7c87fcf in +[NSException raise:format:arguments:] (self=0xb7f03720,
_cmd=0xb7f03928, name=0x804928c, format=0x8049298,
argList=0xbf9f2740 \002) at NSException.m:765
#6  0xb7c87f0c in +[NSException raise:format:] (self=0xb7f03720,
_cmd=0x80493b0, name=0x804928c, format=0x8049298) at NSException.m:751
#7  0x08048a7d in +[MLKInvocationExceptionTest raiseException] (
self=0x8049340, _cmd=0x8049380) at MLKInvocationExceptionTest.m:30
#8  0xb775c537 in __builtin_avcall () from /usr/lib/libavcall.so.0
#9  0xb7d8a92d in GSFFCallInvokeWithTargetAndImp (_inv=0x89cc828,
anObject=0x8049340,
imp=0x8048a23 +[MLKInvocationExceptionTest raiseException])
at GSFFCallInvocation.m:708
#10 0xb7d8acf6 in -[GSFFCallInvocation invokeWithTarget:] (self=0x89cc828,
_cmd=0xb7f0b220, anObject=0x8049340) at GSFFCallInvocation.m:778
#11 0xb7ca084a in -[NSInvocation invoke] (self=0x89cc828, _cmd=0x80493a8)
at NSInvocation.m:655
#12 0x080489f3 in +[MLKInvocationExceptionTest test] (self=0x8049340,
_cmd=0x80493c8) at MLKInvocationExceptionTest.m:19
#13 0x08048b30 in main () at MLKInvocationExceptionTest.m:39

*** GDB TRANSCRIPT END ***

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=de_AT, LC_CTYPE=de_AT (charmap=UTF-8) (ignored: LC_ALL
set to de_AT.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libgnustep-base1.16 depends on:
ii  gnustep-base-common1.16.3-2  GNUstep Base library - common file
ii  gnustep-common [gnuste 2.0.6-2   Common files for the core GNUstep
ii  libavahi-compat-libdns 0.6.23-2  Avahi Apple Bonjour compatibility
ii  libc6  2.7-12GNU C Library: Shared libraries
ii  libffcall1 1.10+2.41-3   Foreign Function Call Libraries
ii  libgcc11:4.3.1-8 GCC support library
ii  libgnutls262.4.1-1   the GNU TLS library - runtime libr
ii  libobjc2   4.3.1-8   Runtime library for GNU Objective-
ii  libxml22.6.32.dfsg-2 GNOME XML library
ii  libxslt1.1 1.1.24-1  XSLT processing library - runtime
ii  zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages libgnustep-base1.16 recommends:
ii  gnustep-base-runtime  1.16.3-2   GNUstep Base library

libgnustep-base1.16 suggests no packages.

Bug#493250: [libgnustep-base1.16] NSInvocation breaks exception handling

2008-08-01 Thread Hubert Chathi
On Fri, 1 Aug 2008 17:16:26 +0200, Matthias Andreas Benkard [EMAIL 
PROTECTED] said:

 The program below, which does little more than raising an exception
 from a method invoked by means of an NSInvocation object, crashes with
 a SIGABRT by calling abort() from objc_exception_throw() as indicated
 by the attached gdb output.

 With either libgnustep-base1.16-libffi or a manually compiled stable
 GNUstep Base (1.16.3), as well as with a current Subversion checkout
 of GNUstep Base (both compiled using ffcall, not libffi), the program
 instead handles the exception as intended:

That's odd.  Are there any differences between the way you compile
GNUstep Base, and the way the package is built?  e.g. what flags do you
pass to configure?

Do you have libffi-dev installed?  With GNUstep Base 1.16.3, it will use
libffi if it can find it, even if you say --enable-ffcall, unless you
specifically say --disable-libffi.

Anyways, this may all be moot, since you say it doesn't happen with
libgnustep-base1.16-libffi.  After lenny is released, we will be
defaulting to using libffi, since upstream prefers it now.  The reason
we haven't switched yet is because we wouldn't be able to sufficiently
test such a big change before the release of lenny.

-- 
Hubert Chathi [EMAIL PROTECTED] -- Jabber: [EMAIL PROTECTED]
PGP/GnuPG key: 1024D/124B61FA http://www.uhoreg.ca/
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]