Cheers,

on Zcode, Jason Felice has been doing great work on cleaning up the mess I
made of the code, refactoring it to make PBX reader actually usable in other
projects (separated into PBXProjLib), et cetera. The code can be pulled
using Mercurial with "hg clone https://bitbucket.org/ivucica/zcode"; (or
viewed at the same URL).

One of the things he's worked on is a test suite for PBXProjLib.  There's a
strange crash inside the runtime in one of the tests. Jason, please correct
me if anything I state below is wrong:

ivucica@theevilmacbook:~/Development/Zcode$ make check
This is gnustep-make 2.4.0. Type 'make print-gnustep-make-help' for help.
Making check in check ...
for t in obj/check_Zcode; do $t || exit $?; done
ZCPBXProjectReader_loads_plist_dictionary ... done
ZCPBXProjectReader_signals_error_if_plist_cant_be_loaded ... done
*ZCPBXProjectReader_returns_error_message ... check_Zcode:
/scratch/packages/gcc/4.4/gcc-4.4-4.4.5/src/libobjc/class.c:560:
__objc_resolve_class_links: Assertion
`((class1->class_pointer)&&((((class1->class_pointer)->info)&0x2L)==0x2L))'
failed.*
Aborted
make[1]: *** [internal-check] Error 134
make: *** [internal-check] Error 2


This is the code of the test:

CHECK(ZCPBXProjectReader_returns_error_message)
{
        ZCPBXProjectReader *r = [[ZCPBXProjectReader alloc] initWithFile:@
"does_not_exist.pbxproj"];
        (void) r.plist;
        assert(r.errorMessage != nil);
        [r release];
}



This is compiled with clang 1.1 under Debian:
ivucica@theevilmacbook:~/Development/Zcode/check$ clang -v
clang version 1.1 (Debian 2.7-3)
Target: i386-pc-linux-gnu
Thread model: posix

libobjc2 seems to be the one that shipped with GCC 4.4.5:
ivucica@theevilmacbook:~/Development/Zcode/check$ apt-cache showpkg libobjc2
Package: libobjc2
Versions:
4.4.5-10
(/var/lib/apt/lists/ftp.hr.debian.org_debian_dists_testing_main_binary-i386_Packages)
(/var/lib/dpkg/status)
(etc)

This is Objective-C 2.0 code. Tests are running consecutively one after
another in the same process. Jason has experienced the same crash under
Ubuntu. (I don't know the version

What's wrong here? Is this a bug that's fixed in recent versions of the
runtime or in recent versions of the GNUstep? Did we stumble upon some new
bug? Did we forget to initialize anything? PBXProjLib uses just the
Foundation. There appear to be no issues under Apple's Cocoa environment.

Jason has done a bit of research on what is the issue, but I'd leave it to
him to state the exact problems. In the meantime, the bug is reproducible,
and I'm not sure what to do about it.

Any insight you guys could shed on this would be much appreciated. We'd (or
at least I'd) hate to go back to ObjC1.0 just because of a silly bug.
--
Regards,

Ivan Vučica
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to