libobjc ABI incompatibilities

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

libobjc ABI incompatibilities

Andreas Fink-2
Hello all
I have a project constantly eating memory in some cases. With the help of Valgind I broke it down to the fact that apparently all objc objects are never released and this not in my code and it seems to be they are all allocated like this:

==26443== 4,825,344 bytes in 50,264 blocks are definitely lost in loss record 5,148 of 5,148
==26443==    at 0x7D24BC5: calloc (vg_replace_malloc.c:711)
==26443==    by 0x8778216: allocate_class (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x876818B: class_createInstance (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x8770983: objc_upgrade_protocol_gsv1 (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x8764CBF: init_protocols (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x87649A7: objc_init_protocols (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x87706D9: objc_upgrade_category (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x876456E: __objc_exec_class (in /usr/local/lib/libobjc.so.4.6)
==26443==    by 0x7106859: call_init.part.0 (dl-init.c:72)
==26443==    by 0x710696A: call_init (dl-init.c:30)
==26443==    by 0x710696A: _dl_init (dl-init.c:120)
==26443==    by 0x70F7C59: ??? (in /lib/x86_64-linux-gnu/ld-2.24.so)
==26443==    by 0x1: ???

objc_upgrade_protocol_gsv1 points to OLDABI_COMPAT being true (as otherwise it is not compiled in)

I'm using the latest libojbc2-1.9 gnustep-make and gnustep-base. It seems that all code is compiled using -fobjc-runtime=gnustep-1.8 however (which comes from gnustep-make)
So its using an older ABI. From reading the readme's I learned that   -fobjc-runtime=gnustep-2.0 and setting OLDABI_COMPAT to false would be more appropriate for me so I can finally forget all about the old ABI and would fail early if its still trying to be used.

However I have not found the correct way to set this for gnustep-make so it propagates to gnustep-base etc except patching makefiles or so.

Does anyone know what is the most clean way to have this configured?

Andreas



_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep