Community
Participate
Working Groups
Created attachment 232418 [details] Test Class I'm using the WeavingURLClassLoader programatically for LTW. Once I add the following aspect the byte code verifier throws a java.lang.VerifyError: public pointcut serverSocketCtor() : call(ServerSocket.new(..)) && !within(com.gc.mimicry..*) && !within(java..*); Object around() : serverSocketCtor() { return null; } java.lang.VerifyError: (class: examples/PingPongServer, method: main signature: ([Ljava/lang/String;)V) Unable to pop operand off an empty stack at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2451) at java.lang.Class.getMethod0(Class.java:2694) at java.lang.Class.getMethod(Class.java:1622) ...
Do you by any chance have the source code for examples.PingPongServer? (And how is it compiled to bytecode?) It looks to be the unusual bytecode patterns in PingPongServer before the ServerSocket constructor is called. I think they are tripping up the around advice weaving.
Created attachment 232926 [details] The source of PingPongServer class
Of course, I should have added it directly, sorry for that. I've now attached the source code of the PingPongServer class. It was compiled using Oracle's JDK and later on optimized using the soot framework (http://www.sable.mcgill.ca/soot/) with the following flags: Options.v().set_keep_line_number( true ); Options.v().set_src_prec( Options.src_prec_only_class ); Options.v().set_output_format( Options.output_format_jasmin ); Options.v().set_keep_offset( true ); PhaseOptions.v().setPhaseOption( "jb", "on" ); PhaseOptions.v().setPhaseOption( "jb", "use-original-names:true" );