bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _c_GSFFCallInvocation__load segfault


From: Ildar Mulyukov
Subject: Re: _c_GSFFCallInvocation__load segfault
Date: Mon, 15 Oct 2001 12:17:29 +0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4+) Gecko/20011004

   Helo, all, Adam!

Adam Fedor wrote:

Ildar Mulyukov wrote:

This error occures in every program linked with gnustep-base.

My configuration is Cygwin+GCC 3.0.1 self-built compiler (see http://www.cygwin.com/ml/cygwin/2001-10/msg00502.html). Due to test (see the reference above) I don't think it's compiler problem.

I'll try to dig the problem but maybe you have any ideas? Any comments would be appreciated.
Thank you, Ildar.

*** GDB log ***
Starting program: /d/Temp/doc/objc/test/./shared_debug_obj/ix86/cygwin/gnu-gnu-gnu/Test.exe

Program received signal SIGSEGV, Segmentation fault.
_c_GSFFCallInvocation__load (self=0x4f51fc, _cmd=0xa019c98) at GSFFCallInvocation.m:454



That's pretty odd. Are you using the libobjc library that comes with gcc 3.0 or the gnustep-obj library? The gcc one doesn't properly export some variables, but that would just not let you link the program, I don't think it would cause it to crash.

This is actually not the problem of GCC's libobjc. In fact gnustep-libobjc does not export all needed symbols either (e.g. __objc_msg_forward). But this problem can be fixed very simply - just by adding symbols into libobjc.def file (again in

http://www.cygwin.com/ml/cygwin/2001-10/msg00502.html  
<http://www.cygwin.com/ml/cygwin/2001-10/msg00502.html>

). I tried also gcc-2.95.3+gnustep-libobjc pair with the same result. I found the real problem. Look at that simple code:
*****
extern void* (*__objc_msg_forward)(void*);

main() {
   void* p;
   p = __objc_msg_forward;
   __objc_msg_forward = 0; }
*****
when I do "gcc -g test.c -lobjc && ./a.exe" it coredumps with segfault. The problem occures when writing to __objc_msg_forward (the last line of the program). This is very strange as the example above works OK with a simple DLL exporting a variable like __objc_msg_forward. Probably I should ask about it at cygwin list...

Regards, Ildar.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]