public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bryce McKinlay <bmckinlay@gmail.com>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: Java Patches <java-patches@gcc.gnu.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [REVIVED: PATCH PR42811,4.5 regression] java.lang.ExceptionInInitializerError  	in ecj1
Date: Mon, 15 Feb 2010 13:04:00 -0000	[thread overview]
Message-ID: <7230133d1002150504r23738e28if92303426c349661@mail.gmail.com> (raw)
In-Reply-To: <4B78BA6D.5000603@gmail.com>

On Fri, Feb 5, 2010 at 10:26 PM, Dave Korn
<dave.korn.cygwin@googlemail.com> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42811
>
>
>    Hi lists,
>
>  In this PR, ecj1 is failing (on Cygwin, presumably MinGW as well) owing to
> unintended fallout from building libgcj as two separate DLLs.
>
>  There are only static dependencies (i.e. unresolved symbols in the ecj.o
> object) for ecjx to pull in the main libgcj at linktime, so only that DLL gets
> loaded into memory at runtime.  But the class loader wants to load something
> from the subsidiary (-noncore) DLL, and it's not present in memory, so it
> fails.  (IIUC this is what the class definition data that is stored in .jcr
> sections and made available to the class loader through a a .ctor-like
> mechanism in the crtbegin code is all about.)
>
>  In this patch, I add an arbitrary undef to the link spec, against a fairly
> randomly chosen symbol (my only criterion was that the org.ietf.jgss namespace
> is probably fairly stable) from the -noncore part of the library.  This
> sufficed to build an ecjx that links against and hence loads both DLLs, and it
> doesn't throw the exception shown in the PR anymore.

> libjava/ChangeLog:
>
>        PR java/42811
>        * configure.ac (libgcj_spec_lgcj_override): Add undefined reference
>        to arbitrary symbol in noncore library.

Hi Dave

I'm not sure if this sounds like the right fix. Isn't it the point of
libgcj-noncore that applications which only want "core" classes can
link a smaller libgcj without having to distribute or load the
"noncore" classes? Doesn't adding a dependency from libgcj to
libgcj-noncore defeat this?

If ecj needs something from -noncore, shouldn't it be ecj that
explicitly links it?

>        * jvmti.cc (_Jv_GetJVMTIEnv): Fix use of uninitialised memory
>        exposed by the above change.

This part is fine.

Bryce

  reply	other threads:[~2010-02-15 13:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 22:09 [PATCH " Dave Korn
2010-02-06  6:12 ` Dave Korn
2010-02-15  2:49   ` [REVIVED: PATCH " Dave Korn
2010-02-15 13:04     ` Bryce McKinlay [this message]
2010-02-18  4:28       ` Dave Korn
2010-02-18 15:38         ` 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=7230133d1002150504r23738e28if92303426c349661@mail.gmail.com \
    --to=bmckinlay@gmail.com \
    --cc=dave.korn.cygwin@googlemail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@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).