This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix libjava breakage with glibc 2.2.2pre
On Wed, Feb 14, 2001 at 12:41:28PM +0000, Andrew Haley wrote:
> This still won't work, because, although pthread_sighandler() passes
> the context in, it doesn't copy it back:
>
> if (in_sighandler == NULL)
> THREAD_SETMEM(self, p_in_sighandler, CURRENT_STACK_FRAME);
> sighandler[signo].old(signo, SIGCONTEXT_EXTRA_ARGS ctx);
> if (in_sighandler == NULL)
> THREAD_SETMEM(self, p_in_sighandler, NULL);
>
> [ I don't think this is a bug: AFAIK there's nothing that says it
> should. ]
I don't see from the code where do you need copying of the sigcontext back,
since it modifies (%ebp) and 4(%ebp) and thus IMHO does not sigreturn, but
if the sigreturn happens for some reason, the easiest solution would be to
use SA_SIGINFO (because the sighandler is then passed a pointer to
sigcontext, not sigcontext itself, so you can modify it at will).
Jakub