From: SourceForge.net <no...@so...> - 2012-11-21 15:58:58
|
Patches item #3431812, was opened at 2011-11-01 03:43 Message generated for change (Comment added) made by lewijw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=720017&aid=3431812&group_id=130558 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bas de Bakker (basdebakker) Assigned to: Nobody/Anonymous (nobody) Summary: Generate stack map frames required in Java 7 Initial Comment: In Java 6, the StackMapTable attribute was introduced. At that time it was already announced that this would become required in Java 7. This patch makes ASM regenerate those attributes from the modified byte code, avoiding VerifyErrors in the instrumented class files. ---------------------------------------------------------------------- >Comment By: John Lewis (lewijw) Date: 2012-11-21 07:58 Message: Thanks for the patch. Is there anything else required or left out of the patch? The net.sourceforge.cobertura.test.FunctionalTest.simpleFunctionalTest() fails when this patch is applied. Is a later version of ASM needed? Here is the error: [cobertura-instrument] Cobertura null - GNU GPL License (NO WARRANTY) - See COPYRIGHT file [cobertura-instrument] Instrumenting 2 files to C:\Users\jwlewi\AppData\Local\Temp\cobertura_test1353512654190\instrument [cobertura-instrument] DEBUG - Instrumenting class C:\Users\jwlewi\AppData\Local\Temp\cobertura_test1353512654190\src\mypackage\Main.class [cobertura-instrument] WARN - Unable to instrument file C:\Users\jwlewi\AppData\Local\Temp\cobertura_test1353512654190\src\mypackage\Main.class [cobertura-instrument] java.lang.RuntimeException: java.lang.ClassNotFoundException: mypackage.Simple [cobertura-instrument] Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: mypackage.Simple [cobertura-instrument] at org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.Frame.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.Frame.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.Frame.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.Frame.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source) [cobertura-instrument] at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source) [cobertura-instrument] at org.objectweb.asm.MethodAdapter.visitMaxs(Unknown Source) [cobertura-instrument] at org.objectweb.asm.MethodAdapter.visitMaxs(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.instrument.SecondPassMethodInstrumenter.visitMaxs(SecondPassMethodInstrumenter.java:353) [cobertura-instrument] at org.objectweb.asm.tree.MethodNode.accept(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.instrument.FirstPassMethodInstrumenter.visitEnd(FirstPassMethodInstrumenter.java:171) [cobertura-instrument] at org.objectweb.asm.ClassReader.accept(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassReader.accept(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:367) [cobertura-instrument] at net.sourceforge.cobertura.instrument.SecondPassMethodInstrumenter.visitMaxs(SecondPassMethodInstrumenter.java:353) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:425) [cobertura-instrument] at org.objectweb.asm.tree.MethodNode.accept(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:511) [cobertura-instrument] at net.sourceforge.cobertura.instrument.FirstPassMethodInstrumenter.visitEnd(FirstPassMethodInstrumenter.java:171) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.main(Main.java:533) [cobertura-instrument] at org.objectweb.asm.ClassReader.accept(Unknown Source) [cobertura-instrument] Caused by: java.lang.ClassNotFoundException: mypackage.Simple [cobertura-instrument] at java.net.URLClassLoader$1.run(URLClassLoader.java:200) [cobertura-instrument] at org.objectweb.asm.ClassReader.accept(Unknown Source) [cobertura-instrument] at java.security.AccessController.doPrivileged(Native Method) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:367) [cobertura-instrument] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:425) [cobertura-instrument] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:511) [cobertura-instrument] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.main(Main.java:533) [cobertura-instrument] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) [cobertura-instrument] Caused by: java.lang.ClassNotFoundException: mypackage.Simple [cobertura-instrument] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [cobertura-instrument] at java.net.URLClassLoader$1.run(URLClassLoader.java:200) [cobertura-instrument] at java.lang.Class.forName0(Native Method) [cobertura-instrument] at java.security.AccessController.doPrivileged(Native Method) [cobertura-instrument] at java.lang.Class.forName(Class.java:164) [cobertura-instrument] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [cobertura-instrument] ... 15 more [cobertura-instrument] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [cobertura-instrument] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) [cobertura-instrument] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) [cobertura-instrument] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [cobertura-instrument] at java.lang.Class.forName0(Native Method) [cobertura-instrument] at java.lang.Class.forName(Class.java:164) [cobertura-instrument] ... 15 more ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=720017&aid=3431812&group_id=130558 |