harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2926) [drlvm][jvmti] JVMTI Exception Callbacks reported at incorrect byte code offset
Date Wed, 31 Jan 2007 22:18:05 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Gregory Shimansky updated HARMONY-2926:

    Attachment: harmony-2926.patch

Interpreter had a bug when the catch location is always equal to IP of the stack trace where
exception is propagated (always points to athrow or invoke bytecode).

In JIT mode things are more complicated. The athrow bytecode is translated into a helper call,
and stack iterator points to an instruction after the helper call, which is a next bytecode.
In this case IP has to be moved back for correct mapping. But when a hardware exception like
NPE is generated, IP points to a correct instruction. So IP has to be moved back only in case
the exception is thrown by athrow.

I think I've fixed this in attached patch. I am going to create a regression test and then
commit the patch.

> [drlvm][jvmti] JVMTI Exception Callbacks reported at incorrect byte code offset
> -------------------------------------------------------------------------------
>                 Key: HARMONY-2926
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2926
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Binary JRE release: harmony-jre-r487452
> 32bit windows XP SP2
>            Reporter: Chris Elford
>         Assigned To: Gregory Shimansky
>            Priority: Minor
>         Attachments: bugshow.c, harmony-2926.patch, repro.java
> If one registers for Exception callbacks in JVMTI, the byte code offset reported for
the throwing location is sometimes reported incorrectly 1 bytecode above where the exception
is reported with other JVMs (e.g., Sun and BEA).  I will attach sample Java applicationand
JVMTI agent code to reproduce.
> c:\java\bea50\bin\java -agentlib:bugshow repro
> ...
> EXCEPTION: main(bc=0xf)->main(bc=0x13)
> ...
> c:\java\sun50_09_jre\bin\java -agentlib:bugshow repro
> ...
> EXCEPTION: main(bc=0xf)->main(bc=0x13)
> ...
> c:\java\hre50\bin\java -agentlib:bugshow repro
> ...
> EXCEPTION: main(bc=0x10)->main(bc=0x13)
> ...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message