From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: Bryce McKinlay <bmckinlay@gmail.com>,
java@gcc.gnu.org, Andrew Haley <aph@redhat.com>
Subject: Re: Question about a comment in _Jv_StackTrace::UnwindTraceFn
Date: Thu, 21 May 2009 19:13:00 -0000 [thread overview]
Message-ID: <4A15AA6B.1090205@gmail.com> (raw)
In-Reply-To: <4A15A5CD.1000209@gmail.com>
Dave Korn wrote:
> So, I think maybe I have *two* problems:
>
> i) The gcj::Core::root chain is empty. Should it be? Do I have a problem
> with static c/dtors? I don't have JCR_SECTIONS turned on yet, so maybe I need
> to enable it?
To half-answer my own question there, __Jv_global_static_constructor is at
least being called at static ctor time, so I should be OK on most fronts.
> ii) I don't think the library is able to handle an exception being thrown this
> early in startup because the code that segfaults filling out the stacktrace
> does assume it's inside at least one nested interpreter frame, and it wouldn't
> be called at all if it wasn't for what looks like a race-condition failure of
> the safety check at the top of java::lang::VMThrowable::fillInStackTrace.
> Should nothing be throwing at this early stage, or should we perhaps not set
> runtimeInitialized until later? I note that it gets set true a second time,
> apparently redundantly, at the very end of _Jv_CreateJavaVM, so perhaps an
> accident of some sort has occurred here? I'll take a look through the svn
> history.
Yes, this looks like a regression. The setting of runtimeInitialized was
moved to the end of the function in r115791
Revision 115791 - (view) (download) - [select for diffs]
Modified Fri Jul 28 07:40:17 2006 UTC (2 years, 9 months ago) by gary
File length: 45045 byte(s)
Diff to previous 114300 (colored)
2006-07-28 Gary Benson <gbenson@redhat.com>
* prims.cc (_Jv_CreateJavaVM): Move setting runtimeInitialized
from the start to the end of the function. Remove references
to VMThrowable.trace_enabled.
* java/lang/natVMThrowable.cc (fillInStackTrace): Use
runtimeInitialized rather than trace_enabled to decide
whether to inhibit stack trace generation.
* java/lang/VMThrowable.java (trace_enabled): Removed.
... and apparently re-added at the start, almost certainly inadvertently, when
Tom merged the gcj-eclipse branch to trunk at r120621.
I will prepare and test a patch that simply removes the re-added set at the
top of the function.
cheers,
DaveK
next prev parent reply other threads:[~2009-05-21 19:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 16:50 Dave Korn
2009-05-21 17:15 ` Andrew Haley
2009-05-22 1:12 ` Dave Korn
2009-05-21 17:17 ` Bryce McKinlay
2009-05-21 18:53 ` Dave Korn
2009-05-21 19:13 ` Dave Korn [this message]
2009-05-21 20:36 ` Dave Korn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A15AA6B.1090205@gmail.com \
--to=dave.korn.cygwin@googlemail.com \
--cc=aph@redhat.com \
--cc=bmckinlay@gmail.com \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).