This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix libjava breakage with glibc 2.2.2pre


Jakub Jelinek writes:
 > 
 > I have read it after sending the patch to the list.
 > The bug in linuxthreads is fixed since 1999-08-19 (and actually now
 > __sigaction is defined in -lpthread as well, so if it would not be fixed,
 > the trick with __sigaction would not work either).
 > So I guess there are two options: either use syscall(SYS_sigaction)
 > everywhere instead of __sigaction, or a patch below.

There is a testcase libjava.lang/Divide_1.java.  Have you tried it
with your patch?

 > This should be safe, because the linuxthreads bug is fixed in glibc-2.1.3
 > and above and if one compiles libgcj on a box with glibc-2.1.3 and above, it
 > uses at least some symbols @GLIBC_2.1.3 (like __cxa_finalize), so one cannot
 > use that libgcj DSO under older (buggy in this regard) glibcs anyway.

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. ]

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]