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

From: Glenn Morris <[email-masked]>
Date: Fri, 03 Oct 2008 17:18:17 -0400

Trying to bootstrap the GNUStep port on x86_64 GNU/Linux, it segfaults
making autoloads. The problem can be reduced to anything that tries to
set a variable, eg:

../src/bootstrap-emacs -batch --no-site-file \
  --eval '(setq make-backup-files nil)' 

Disclaimer: I know nothing about GNUStep, I just grabbed a tarball and
made a local installation of it.

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47021579284768 (LWP 22766)]
0x00002ac40faccaf6 in NSCountFrames () at NSDebug.m:994
994     NSDebug.m: No such file or directory.
        in NSDebug.m
Current language:  auto; currently objective-c
(gdb) bt
#0  0x00002ac40faccaf6 in NSCountFrames () at NSDebug.m:994
#1  0x00002ac40fad4ff3 in GSPrivateStackAddresses () at NSDebug.m:1100
#2  0x00002ac40faeb920 in -[NSException raise] (self=0x1e08b5f0, 
    _cmd=0x2ac40ff96440) at NSException.m:822
#3  0x00002ac40faeb3f4 in +[NSException raise:format:arguments:] (
    self=0x2ac40ff95fe0, _cmd=0x2ac40ff96410, name=0x2ac40ff95aa0, 
    format=0x2ac40ffc5020, argList=0x7fff9b952ba0) at NSException.m:765
#4  0x00002ac40faeb32a in +[NSException raise:format:] (self=0x2ac40ff95fe0, 
    _cmd=0x2ac40ffc66b0, name=0x2ac40ff95aa0, format=0x2ac40ffc5020)
    at NSException.m:751
#5  0x00002ac40fb5ffbb in GSPropertyListFromStringsFormat (string=0x1e02e600)
    at NSPropertyList.m:1505
#6  0x00002ac40fb9a474 in -[NSString propertyList] (self=0x1e02e600, 
    _cmd=0x2ac40fff4f80) at NSString.m:4701
#7  0x00002ac40fbcd5f3 in -[NSUserDefaults __createArgumentDictionary] (
    self=0x1e0843f0, _cmd=0x2ac40fff4bf0) at NSUserDefaults.m:1816
#8  0x00002ac40fbc8e0e in -[NSUserDefaults initWithContentsOfFile:] (
    self=0x1e0843f0, _cmd=0x2ac40fff4ae0, path=0x1e085620)
    at NSUserDefaults.m:872
#9  0x00002ac40fbc8349 in -[NSUserDefaults initWithUser:] (self=0x1e0843f0, 
    _cmd=0x2ac40fff4ad0, userName=0x1df2b330) at NSUserDefaults.m:774
#10 0x00002ac40fbc82c4 in -[NSUserDefaults init] (self=0x1e0843f0, 
    _cmd=0x2ac40fff4910) at NSUserDefaults.m:765
#11 0x00002ac40fbc7383 in +[NSUserDefaults standardUserDefaults] (
    self=0x2ac40fff46c0, _cmd=0x2ac40fff4870) at NSUserDefaults.m:474
#12 0x00002ac40fbc7c78 in +[NSUserDefaults userLanguages] (
    self=0x2ac40fff46c0, _cmd=0x2ac40ff769f0) at NSUserDefaults.m:682
#13 0x00002ac40fa86b99 in +[NSBundle _bundleResourcePathsWithRootPath:subPath:]
    (self=0x2ac40ff76360, _cmd=0x2ac40ff76a00, rootPath=0x1e070fa0, 
    subPath=0x0) at NSBundle.m:1603
#14 0x00002ac40fa86e05 in +[NSBundle pathForResource:ofType:inRootPath:inDirectory:withVersion:] (self=0x2ac40ff76360, _cmd=0x2ac40ff76a10, 
    name=0x2ac40ff75760, ext=0x2ac40ff75780, rootPath=0x1e070fa0, subPath=0x0, 
    version=0) at NSBundle.m:1637
#15 0x00002ac40fa8731f in -[NSBundle pathForResource:ofType:inDirectory:] (
    self=0x1e079450, _cmd=0x2ac40ff76770, name=0x2ac40ff75760, 
    ext=0x2ac40ff75780, subPath=0x0) at NSBundle.m:1732
#16 0x00002ac40fa871e4 in -[NSBundle pathForResource:ofType:] (
    self=0x1e079450, _cmd=0x2ac40ff76b10, name=0x2ac40ff75760, 
    ext=0x2ac40ff75780) at NSBundle.m:1713
#17 0x00002ac40fa890f5 in -[NSBundle infoDictionary] (self=0x1e079450, 
    _cmd=0x2ac40ff76990) at NSBundle.m:2192
#18 0x00002ac40fa893d5 in -[NSBundle bundleIdentifier] (self=0x1e079450, 
    _cmd=0x2ac40ff768f0) at NSBundle.m:2237
#19 0x00002ac40fa858b3 in -[NSBundle initWithPath:] (self=0x1e079450, 
    _cmd=0x2ac40ff76750, path=0x1e070fa0) at NSBundle.m:1315
#20 0x00002ac40fa852a0 in +[NSBundle bundleWithPath:] (self=0x2ac40ff76360, 
    _cmd=0x2ac40ff76bc0, path=0x1e079270) at NSBundle.m:1192
#21 0x00002ac40fa89980 in +[NSBundle(GNUstep) bundleForLibrary:version:] (
    self=0x2ac40ff76360, _cmd=0x2ac40ff76820, libraryName=0x1e033250, 
    interfaceVersion=0x2ac40ff75080) at NSBundle.m:2352
#22 0x00002ac40fa8406a in +[NSBundle initialize] (self=0x2ac40ff76360, 
    _cmd=0x2ac40fffaef0) at NSBundle.m:819
#23 0x00002ac41005c04d in objc_msg_lookup () from /usr/lib64/libobjc.so.1
#24 0x00000000006b8b44 in ns_init_paths () at nsterm.m:329
#25 0x0000000000579fe2 in main (argc=5, argv=0x7fff9b953ca8) at emacs.c:1467