Subject: Re: bug#1079: GNUstep port segfaults making autoloads on x86_64

From: Glenn Morris <[email-masked]>
Date: Thu, 09 Oct 2008 21:03:29 -0400

reassign 1079 gnustep
stop

Yavor Doganov wrote:

> AFAICS ./InstallGNUstep --ffi=libffi should DTRT.

It doesn't work, it builds libffcall anyway.

> It is excellent that it crashes, this confirms it's a GNUstep bug.

Reassigned as such.

> 1) Check if it still crashes with -base built against libffi.
> 2) Check if the problem persists in SVN trunk:
>    svn co http://svn.gna.org/svn/gnustep/libs/base/trunk gnustep-base

Still crashes with trunk gnustep-base built against libffi.
Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47788427799904 (LWP 5561)]
0x00002b769ba95ea2 in NSCountFrames () at NSDebug.m:994
994           _NS_COUNT_HACK(24); _NS_COUNT_HACK(25); _NS_COUNT_HACK(26);
(gdb) bt full
#0  0x00002b769ba95ea2 in NSCountFrames () at NSDebug.m:994
        env = (jbuf_type *) 0xe4cda90
#1  0x00002b769ba9e39f in GSPrivateStackAddresses () at NSDebug.m:1100
        n = 0
        stack = (class NSMutableArray *) 0x2b769bfc06e0
        pool = (class NSAutoreleasePool *) 0x7fff0f1d3670
        i = 11126
        env = (jbuf_type *) 0x8
#2  0x00002b769bab4f00 in -[NSException raise] (self=0xe4cc370, 
    _cmd=0x2b769bf5c5e0) at NSException.m:824
        __value = (struct objc_object *) 0xe4cc370
        __object = (struct objc_object *) 0x7fff0f1d3710
        thread = (TInfo) 0xe4ccbd0
        handler = (NSHandler *) 0x2b769bf5bc40
        recursion = 0
#3  0x00002b769bab49d4 in +[NSException raise:format:arguments:] (
    self=0x2b769bf5c180, _cmd=0x2b769bf5c5b0, name=0x2b769bf5bc40, 
    format=0x2b769bf8b5c0, argList=0x7fff0f1d3750) at NSException.m:767
        reason = (class NSString *) 0xe4ccbd0
        except = (class NSException *) 0xe4cc370
#4  0x00002b769bab490a in +[NSException raise:format:] (self=0x2b769bf5c180, 
    _cmd=0x2b769bf8cc50, name=0x2b769bf5bc40, format=0x2b769bf8b5c0)
    at NSException.m:753
        args =   {{
    gp_offset = 32, 
    fp_offset = 48, 
    overflow_arg_area = 0x7fff0f1d3840, 
    reg_save_area = 0x7fff0f1d3770
  }}
---Type <return> to continue, or q <return> to quit---
#5  0x00002b769bb29a1b in GSPropertyListFromStringsFormat (string=0xe481290)
    at NSPropertyList.m:1510
        dict = (class NSMutableDictionary *) 0x0
        _pld = {
  ptr = 0xe4caa60 "(setq foo 1)8", 
  end = 12, 
  pos = 0, 
  lin = 0, 
  err = 0x2b769bf8b5a0, 
  opt = NSPropertyListImmutable, 
  key = 0 '\000', 
  old = 1 '\001'
}
        pld = (pldata *) 0x7fff0f1d3860
        d = (class NSData *) 0xe4cc520
        __PRETTY_FUNCTION__ =   "GSPropertyListFromStringsFormat"
#6  0x00002b769bb6404b in -[NSString propertyList] (self=0xe481290, 
    _cmd=0x2b769bfbb640) at NSString.m:4704
        NSLocalHandler = {
  jumpState =     {{
      __jmpbuf =         {47788422907072,
        -4067403250950454424,
        239902336,
        47788417072620,
        239527008,
        0,
        -4067403250950455080,
        -4067319175159268909}, 
      __mask_was_saved = 0, 
---Type <return> to continue, or q <return> to quit---
      __saved_mask = {
        __val =           {47788422984784,
          239604368,
          239604368,
          239902336,
          47788417072620,
          239527008,
          0,
          140733446961712,
          47788418504034,
          34599342688,
          47788423095104,
          47788422984864,
          239604368,
          51539607552,
          239604368,
          140733446961792}
      }
    }}, 
  next = 0x7fff0f1d3aa0, 
  exception = 0x7fff0f1d3a80
}
        data = (class NSData *) 0xe4caab0
        result = (struct objc_object *) 0x0
        format = NSPropertyListOpenStepFormat
        error = (class NSString *) 0xe4cc4a0
#7  0x00002b769bb9745c in -[NSUserDefaults __createArgumentDictionary] (
    self=0xe4c76d0, _cmd=0x2b769bfbb2b0) at NSUserDefaults.m:1816
        NSLocalHandler = {
---Type <return> to continue, or q <return> to quit---
  jumpState =     {{
      __jmpbuf =         {239604368,
        -4067403250950454728,
        239902336,
        47788417072620,
        239527008,
        0,
        -4067403250950454408,
        -4067319175160263208}, 
      __mask_was_saved = 0, 
      __saved_mask = {
        __val =           {0,
          239902608,
          10,
          140733446961952,
          47788417068869,
          240,
          47788423120608,
          140733446962032,
          47788417068635,
          43189575376,
          239902344,
          5,
          239902576,
          8,
          239902608,
          18446744073709551615}
      }
    }}, 
---Type <return> to continue, or q <return> to quit---
  next = 0x0, 
  exception = 0x7fff0f1d3ba0
}
        plist_val = (class NSObject *) 0xa9bfbafc0
        old = (class NSString *) 0x0
        args = (class NSArray *) 0xe4836f0
        enumerator = (class NSEnumerator *) 0xe4ca310
        argDict = (class NSMutableDictionary *) 0xe4ca930
        done = 0 '\000'
        key = (struct objc_object *) 0xe4caa30
        val = (struct objc_object *) 0xe481290
#8  0x00002b769bb92c5a in -[NSUserDefaults initWithContentsOfFile:] (
    self=0xe4c76d0, _cmd=0x2b769bfbb1a0, path=0xe4c85b0)
    at NSUserDefaults.m:872
        mgr = (class NSFileManager *) 0xe499120
        r = {
  location = 2147483647, 
  length = 0
}
        loadReadonly = 0 '\000'
        flag = 0 '\000'
        objc_super = {
  self = 0xe4c76d0, 
  super_class = 0x2b769bf7ce00
}
#9  0x00002b769bb92195 in -[NSUserDefaults initWithUser:] (self=0xe4c76d0, 
    _cmd=0x2b769bfbb190, userName=0xe442c60) at NSUserDefaults.m:774
        path = (class NSString *) 0xe4c8470
#10 0x00002b769bb92110 in -[NSUserDefaults init] (self=0xe4c76d0, 
---Type <return> to continue, or q <return> to quit---
    _cmd=0x2b769bfbafd0) at NSUserDefaults.m:765
No locals.
#11 0x00002b769bb911cf in +[NSUserDefaults standardUserDefaults] (
    self=0x2b769bfbad80, _cmd=0x2b769bfbaf30) at NSUserDefaults.m:474
        added_lang = 0 '\000'
        added_locale = 0 '\000'
        lang = (struct objc_object *) 0x2b769c22b708
        uL = (class NSArray *) 0x7fff0f1d3db0
        enumerator = (class NSEnumerator *) 0x2b769b9e90ea
#12 0x00002b769bb91ac4 in +[NSUserDefaults userLanguages] (
    self=0x2b769bfbad80, _cmd=0x2b769bf3caf0) at NSUserDefaults.m:682
        currLang = (class NSArray *) 0x0
        locale = (class NSString *) 0xe4c76a0
        result = (class NSArray *) 0x2b769c22b708
#13 0x00002b769ba4fded in +[NSBundle _bundleResourcePathsWithRootPath:subPath:]
    (self=0x2b769bf3c460, _cmd=0x2b769bf3cb00, rootPath=0xe4bb830, subPath=0x0)
    at NSBundle.m:1603
        primary = (class NSString *) 0x2b769bf9db60
        language = (class NSString *) 0x9
        languages = (class NSArray *) 0x100000000
        array = (class NSMutableArray *) 0xe4c19c0
        enumerate = (class NSEnumerator *) 0x2b769bf3c460
#14 0x00002b769ba50059 in +[NSBundle pathForResource:ofType:inRootPath:inDirectory:withVersion:] (self=0x2b769bf3c460, _cmd=0x2b769bf3cb10, 
    name=0x2b769bf3b860, ext=0x2b769bf3b880, rootPath=0xe4bb830, subPath=0x0, 
    version=0) at NSBundle.m:1637
        path = (class NSString *) 0x7fff00000001
        fullpath = (class NSString *) 0x2b769bb00170
        pathlist = (class NSEnumerator *) 0x7fff0f1d3f20
---Type <return> to continue, or q <return> to quit---
#15 0x00002b769ba50573 in -[NSBundle pathForResource:ofType:inDirectory:] (
    self=0xe4c0b50, _cmd=0x2b769bf3c870, name=0x2b769bf3b860, 
    ext=0x2b769bf3b880, subPath=0x0) at NSBundle.m:1732
        rootPath = (class NSString *) 0xe4bb830
#16 0x00002b769ba50438 in -[NSBundle pathForResource:ofType:] (self=0xe4c0b50, 
    _cmd=0x2b769bf3cc10, name=0x2b769bf3b860, ext=0x2b769bf3b880)
    at NSBundle.m:1713
No locals.
#17 0x00002b769ba52349 in -[NSBundle infoDictionary] (self=0xe4c0b50, 
    _cmd=0x2b769bf3ca90) at NSBundle.m:2192
        path = (class NSString *) 0x7fff0f1d4040
#18 0x00002b769ba52629 in -[NSBundle bundleIdentifier] (self=0xe4c0b50, 
    _cmd=0x2b769bf3c9f0) at NSBundle.m:2237
No locals.
#19 0x00002b769ba4eb07 in -[NSBundle initWithPath:] (self=0xe4c0b50, 
    _cmd=0x2b769bf3c850, path=0xe4bb830) at NSBundle.m:1315
        identifier = (class NSString *) 0x2b769bf3c850
        objc_super = {
  self = 0xe4c0b50, 
  super_class = 0x2b769bf7ce00
}
#20 0x00002b769ba4e4f4 in +[NSBundle bundleWithPath:] (self=0x2b769bf3c460, 
    _cmd=0x2b769bf3ccc0, path=0xe4c0990) at NSBundle.m:1192
No locals.
#21 0x00002b769ba52bd4 in +[NSBundle(GNUstep) bundleForLibrary:version:] (
    self=0x2b769bf3c460, _cmd=0x2b769bf3c920, libraryName=0xe499f00, 
    interfaceVersion=0x2b769bf3b180) at NSBundle.m:2352
        b = (class NSBundle *) 0x2b769c022315
        isDir = 1 '\001'
---Type <return> to continue, or q <return> to quit---
        paths = (class NSArray *) 0xe499f40
        enumerator = (class NSEnumerator *) 0xe4bc880
        path = (class NSString *) 0xe4c0990
        fm = (class NSFileManager *) 0xe499120
#22 0x00002b769ba4d2be in +[NSBundle initialize] (self=0x2b769bf3c460, 
    _cmd=0x2b769bfc15b0) at NSBundle.m:819
        env = (class NSDictionary *) 0xe4a0980
        str = (class NSString *) 0xe494c60
#23 0x00002b769c02204d in objc_msg_lookup () from /usr/lib64/libobjc.so.1
No symbol table info available.
#24 0x0000000000400c12 in main (argc=5, argv=0x7fff0f1d44e8, 
    env=0x7fff0f1d4518) at test.m:8
        pool = (class NSAutoreleasePool *) 0xe4720f0
        proc = (class NSProcessInfo *) 0xe4414a0
        bundle = (class NSBundle *) 0x382141abc0
        args = (class NSArray *) 0x401220
        i = 4196843
        retval = 0