Re: Problems setjmp.h on Fedora 5

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

 



Hi,

In recent versions of glibc, setjmp() now mangles the stack pointer when
it stores it and unmangles it in longjmp().  I suspect your code is trying
to change the stack pointer (since it uses the offset), which won't work
unless it knows how to mangle it properly.

Some options are to implement the mangling algorithm in the code (which is
platform specific and will be a pain to maintain), or switch to using
setcontext/makecontext/getcontext.  That's what was done in OpenAFS to
support FC5.

Marc

> Hello,
>
> Maybe this is out of topic, but it's related to developpement and I
> wasn't able to got the answer elsewhere.
>
> I'm having problem related to setjmp calls under a library
> (statethreads) on Fedora 5.
>
> When I try to compile the application using it, I get :
>
> depmode=gcc3 /bin/sh ./depcomp \
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DLINUX -O -g -O2 -c `test
> -f 'sched.c' || echo './'`sched.c
> sched.c: In function ?st_thread_create?:
> sched.c:892: erreur: ?JB_SP? undeclared (first use in this function)
> sched.c:892: erreur: (Each undeclared identifier is reported only once
> sched.c:892: erreur: for each function it appears in.)
> make[3]: *** [sched.o] Erreur 1
> make[3]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
> make[2]: *** [all-recursive] Erreur 1
> make[2]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
> make[1]: *** [all] Erreur 2
> make[1]: Leaving directory `/home/smXinstall/smX-0.0.0.0/statethreads'
> make: *** [all-recursive] Erreur 1
> [root@localhost smX-0.0.0.0]#
>
> Under Fedora 4, JB_SP was defined at /usr/include/bits/setjmp.h header.
> Fedora 5 doesn't define it anymore.
>
> It seems that this come from glibc. JB_SP is still defined in the last
> official glibc release (2.4), but in a different header :
> jmpbuf-offsets.h.
>
> I wasn't able to find any definition of JB_SP in any header of Fedora 5.
>
> I tried to define myself the value of JB_SP (4 - the same value found in
> Fedora 4 headers), but the application segfaults.
>
> Any idea ?
>
> Regards
>
> Jose-Marcio



-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux