Sat 11 Oct 2008 06:14:34 AM UTC, comment #5:
Are you sure you are using an up to date version of GNUstep?
I ask because the bug report referred to says that the crash is a segmentation fault in NSCountFrames, yet the code for that method in the current stable release uses the signal() system call to catch segmentation faults caused when gcc's __builtin_frame_address() runs off the end of the stack (and it seems highly unlikely that the signal() system call provided by your operating system would be faulty)...
unsigned NSCountFrames(void)
{
jbuf_type *env;
env = jbuf();
if (setjmp(env->buf) == 0)
{
env->segv = signal(SIGSEGV, recover);
env->bus = signal(SIGBUS, recover);
env->addr = 0;
#define _NS_COUNT_HACK(X) if (__builtin_frame_address(X + 1) == 0) \
goto done; else env->addr = (void*)(X + 1);
_NS_COUNT_HACK(0); _NS_COUNT_HACK(1); _NS_COUNT_HACK(2);
_NS_COUNT_HACK(3); _NS_COUNT_HACK(4); _NS_COUNT_HACK(5);
|
Sun 16 Mar 2008 02:11:56 PM UTC, comment #2:
it breaks with today's SVN
dave@amd64>./obj/general
PASS: -count returns zero for an empty array
PASS: -hash returns zero for an empty array
PASS: -containsObject works
PASS: -indexOfObject: finds object
PASS: -indexOfObjectIdenticalTo: finds identical object
PASS: -objectEnumerator: is ok for empty array
PASS: -objectEnumerator: enumerates the array
PASS: -description gives us a text property-list (empty array)
PASS: -description gives us a text property-list
PASS: -count returns two for an array with two objects
PASS: -hash returns two for an array with two objects
PASS: -indexOfObject: gives NSNotFound for a nil object
PASS: -indexOfObject: gives NSNotFound for a object not in the array
PASS: Array is equal to itself using -isEqualToArray:
PASS: Similar arrays are not equal using -isEqualToArray:
PASS: -subarrayWithRange: seems ok
Bus error (core dumped)
and with gdb:
dave@amd64>gdb ./obj/general
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64--netbsd"...
(gdb) r
Starting program: /Users/dave/projects/testsuite/trunk/base/NSArray/obj/general
/usr/games/fortune: Command not found.
PASS: -count returns zero for an empty array
PASS: -hash returns zero for an empty array
PASS: -containsObject works
PASS: -indexOfObject: finds object
PASS: -indexOfObjectIdenticalTo: finds identical object
PASS: -objectEnumerator: is ok for empty array
PASS: -objectEnumerator: enumerates the array
PASS: -description gives us a text property-list (empty array)
PASS: -description gives us a text property-list
PASS: -count returns two for an array with two objects
PASS: -hash returns two for an array with two objects
PASS: -indexOfObject: gives NSNotFound for a nil object
PASS: -indexOfObject: gives NSNotFound for a object not in the array
PASS: Array is equal to itself using -isEqualToArray:
PASS: Similar arrays are not equal using -isEqualToArray:
PASS: -subarrayWithRange: seems ok
Program received signal SIGBUS, Bus error.
0x00007f7ffd9bfaa7 in NSCountFrames () at NSDebug.m:995
995 _NS_COUNT_HACK(9); _NS_COUNT_HACK(10); _NS_COUNT_HACK(11);
(gdb) bt
#0 0x00007f7ffd9bfaa7 in NSCountFrames () at NSDebug.m:995
#1 0x00007f7ffd9c7e03 in GSPrivateStackAddresses () at NSDebug.m:1112
#2 0x00007f7ffd9de2f7 in -[NSException raise] (self=0x62c7d0,
_cmd=0x7f7ffdd71e80) at NSException.m:819
#3 0x00007f7ffd9dddcb in +[NSException raise:format:arguments:] (
self=0x7f7ffdd71a20, _cmd=0x7f7ffdd71e50, name=0x7f7ffdd71560,
format=0x7f7ffdd4b840, argList=0x7f7fffffdfa0) at NSException.m:762
#4 0x00007f7ffd9ddd01 in +[NSException raise:format:] (self=0x7f7ffdd71a20,
_cmd=0x7f7ffdd4cbd0, name=0x7f7ffdd71560, format=0x7f7ffdd4b840)
at NSException.m:748
#5 0x00007f7ffd96d6d1 in -[NSArray subarrayWithRange:] (self=0x5d0c90,
_cmd=0x50aa30, aRange={location = 1, length = 2}) at NSArray.m:1113
#6 0x00000000004049c0 in gnustep_base_user_main () at general.m:72
#7 0x00007f7ffda4ac0e in main (argc=1, argv=0x7f7fffffe330,
env=0x7f7fffffe340) at NSProcessInfo.m:913
(gdb)
this is in ...testsuite/trunk/base/NSArray
dave
|
Sat 08 Mar 2008 11:15:04 AM UTC, original submission:
That is the NSArray test. As long as a program is not raising an exception most stuff is ok.
PASS: -subarrayWithRange: seems ok
Program received signal SIGBUS, Bus error.
0x00007f7ffd9bd373 in NSCountFrames () at NSDebug.m:995
995 _NS_COUNT_HACK(9); _NS_COUNT_HACK(10); _NS_COUNT_HACK(11);
(gdb) bt
#0 0x00007f7ffd9bd373 in NSCountFrames () at NSDebug.m:995
#1 0x00007f7ffd9c56cf in GSPrivateStackAddresses () at NSDebug.m:1112
#2 0x00007f7ffd9dbbc3 in -[NSException raise] (self=0x62b7d0,
_cmd=0x7f7ffdd6daa0) at NSException.m:819
#3 0x00007f7ffd9db697 in +[NSException raise:format:arguments:] (
self=0x7f7ffdd6d640, _cmd=0x7f7ffdd6da70, name=0x7f7ffdd6d180,
format=0x7f7ffdd47760, argList=0x7f7fffffdfa0) at NSException.m:762
#4 0x00007f7ffd9db5cd in +[NSException raise:format:] (self=0x7f7ffdd6d640,
_cmd=0x7f7ffdd488d0, name=0x7f7ffdd6d180, format=0x7f7ffdd47760)
at NSException.m:748
#5 0x00007f7ffd96c411 in -[NSArray subarrayWithRange:] (self=0x5cec90,
_cmd=0x50aa30, aRange={location = 1, length = 2}) at NSArray.m:1111
#6 0x00000000004049c0 in gnustep_base_user_main () at general.m:72
#7 0x00007f7ffda47fba in main (argc=1, argv=0x7f7fffffe330,
env=0x7f7fffffe340) at NSProcessInfo.m:913
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz, 2394.27 MHz
cpu0: features: 2ffbfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features: 2ffbfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,B20,DS,ACPI,MMX>
cpu0: features: 2ffbfbff<FXSR,SSE,SSE2,SS,TM>
cpu0: features2: 2211<SSE3,DS-CPL>
cpu0: features3: 2ffbfbff<SYSCALL/SYSRET,XD,EM64T>
cpu0: L2 cache 4 MB 64B/line 16-way
dave@amd64#uname -a
NetBSD amd64 4.0 NetBSD 4.0 (GENERIC) #0: Sat Dec 15 22:25:31 PST 2007 builds@wb28:/home/builds/ab/netbsd-4-0-RELEASE/amd64/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
If somebody wants to fix this, I can create a ssh account.
|