Bug 2319 - JUnit sig-segvs when attempting to print a stack backtrace
Summary: JUnit sig-segvs when attempting to print a stack backtrace
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 1580
  Show dependency treegraph
 
Reported: 2006-02-10 04:58 UTC by Andrew Cagney
Modified: 2006-02-10 16:55 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-02-10 04:58:49 UTC
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)

Running testBBB(frysk.event.TestEventLoop) ...Segmentation fault (core dumped)
Comment 1 Andrew Cagney 2006-02-10 05:02:38 UTC
The problem here is that the java runtime, and frysk are fighting over the
SIGCHLD handler.  Even though frysk doesn't create any child processes, GCJ
does.  GCJ can create two processes:

- a process to demangle symbols
- [possibly] a process to perform address -> line conversion

and install a null sigchld handler.  Frysk, in turn, installs its own
long-jumping handler.

A crash occures when frysk's handler finds itself processing a signal that was
ment for the core.  It attempts to longjmp through a bad buffer.
Comment 2 Andrew Cagney 2006-02-10 05:04:10 UTC
This helps, the jumpbuf has a flag indicating that it should be used.  It will
stop the bad long-jump.

2006-02-09  Andrew Cagney  <cagney@redhat.com>

       * cni/Poll.cxx (struct poll_jmpbuf): Replace poll_env.  A
       per-thread buffer.
Comment 3 Andrew Cagney 2006-02-10 16:55:30 UTC
Index: frysk-core/common/ChangeLog
2006-02-10  Andrew Cagney  <cagney@redhat.com>

        * Makefile.gen.sh (echo_LDFLAGS): Append $(GEN_GCJ_NO_SIGCHLD_FLAGS).
        (echo_name_): New function.
        (echo_LDFLAGS): Use.
        (echo_MANS): Check if man page is needed.
        (echo_PROGRAMS): Move call to echo_MANS out of echo_PROGRAMS.
        (GEN_UBASENAME): Rename GEN_BASEUNAME).
        * Makefile.rules (GEN_GCJ_NO_SIGCHLD_FLAGS): Define.

Index: frysk-core/frysk/event/ChangeLog
2006-02-10  Andrew Cagney  <cagney@redhat.com>

        * TestSigChild.java: New.

unfortunatly this makes stack backtraces sux