Accessing module internals from bytecode rewriting agent
jeremymanson at google.com
Tue Apr 25 06:29:08 UTC 2017
Ah, then it sounds as if I just don't know what I'm doing. Any pointers?
On Mon, Apr 24, 2017 at 11:22 PM, Alan Bateman <Alan.Bateman at oracle.com>
> On 25/04/2017 04:26, Martin Buchholz wrote:
>> java.lang.IllegalArgumentException: illegal lookupClass: class
>> Bytecode rewriting agents have the power to inject code into classes; they
>> should somehow also be able to reflectively inspect those same classes!
>> But how? We ran into similar problems trying to port java agents at
>> to jdk9.
> On the general point: agents (both java and JVM TI agents) can redefine
> any module in support of instrumentation and any amount of deep reflection
> that the agent might do. So I wouldn't expect too many issues although some
> java agents may need updates to work on JDK 9 without encapsulation busting
> command line options.
> On Byteman, Andrew Dinn has been working with us on jigsaw-dev on the
> agent support. From the stack trace then I suspect the issue you are
> running into is that Byteman has also changed to use the new reflection API
> (java.lang.invoke) and is running into a long standing check to prevent
> full power lookups to full privileged classes from leaking. Andrew brought
> this up on jigsaw-dev  a few days ago and we could probably move that
> thread to core-libs-dev.
>  http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-April
More information about the jigsaw-dev