JDK-4834738 NullPointerException: Better info

Krystal Mok rednaxelafx at gmail.com
Fri Apr 18 09:06:21 UTC 2014

There could be quite some differences for the same exception when thrown by
the interpreter and compiled code.
An example is the "fast throw" feature in C2. There would be no detail
message nor stack trace for "fast throw" exceptions.

When I was debugging Java applications around Java-level exceptions, what I
always wanted was the bytecode index of the throwing bytecode, which allows
pinpointing of where something bad happened.
That could easily be provided by both the interpreter and the compiled code
(unless it gets into "fast throw" and you get nothing).

- Kris

On Thu, Apr 17, 2014 at 12:32 PM, David Chase <david.r.chase at oracle.com>wrote:

> The difference in reporting sometimes happens -- I've definitely seen it
> with IllegalAccessError and AbstractMethodError.
> There's a test for 8016839 where you (may) see this in the output.
> David
> On 2014-04-17, at 7:11 AM, Florian Weimer <fweimer at redhat.com> wrote:
> > On 04/15/2014 11:25 AM, Staffan Larsen wrote:
> >
> >> I don’t feel comfortable reviewing the code, by I support the effort
> even if it is only for the interpreter. If at a later stage we can add the
> same information from the compilers, that would of course be good.
> >
> > Is there any precedent for such a difference in exception reporting
> between the interpreter and the compilers (beyond VM errors)?  It seems a
> bit unusual to me, but perhaps I'm wrong.
> >
> > --
> > Florian Weimer / Red Hat Product Security Team

More information about the hotspot-dev mailing list