Re: ASM 6.1-beta released
[email protected] Tue, 9 Jan 2018 20:49:34 +0100 (CET)
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <975366648.46931071.1515527374806.JavaMail.root@zimbra73-e12.priv.proxad.net> |
Hi,
Thanks for your tests! I've been able to reproduce the issue by comparing the output of ASM 6 and 6.1 beta with COMPUTE_FRAMES on the JDK 8 classes. I found one issue which, one fixed, makes the two outputs identical. Let me know if it also fixes your issues. The fix is the following:
diff --git a/asm/src/main/java/org/objectweb/asm/Frame.java b/asm/src/main/java/org/objectweb/asm/Frame.java
index 8273b54..f2aaf39 100644
--- a/asm/src/main/java/org/objectweb/asm/Frame.java
+++ b/asm/src/main/java/org/objectweb/asm/Frame.java
@@ -648,7 +648,8 @@
if (abstractType == UNINITIALIZED_THIS) {
return REFERENCE_KIND | symbolTable.addType(symbolTable.getClassName());
} else {
- return REFERENCE_KIND | symbolTable.addType(symbolTable.getType(value).value);
+ return REFERENCE_KIND
+ | symbolTable.addType(symbolTable.getType(abstractType & VALUE_MASK).value);
}
}
}
Eric
----- Mail original -----
> De: "Kumar Srinivasan" <[email protected]>
> À: "Hannes Wallnöfer" <[email protected]>, "Eric Bruneton" <[email protected]>
> Cc: "Evgeny Mandrikov" <[email protected]>, "Remi Forax" <[email protected]>, "“[email protected]”" <[email protected]>
> Envoyé: Mardi 9 Janvier 2018 16:45:21
> Objet: Re: [asm] ASM 6.1-beta released
>
> Hi,
>
> Filed: https://gitlab.ow2.org/asm/asm/issues/317808
>
> Kumar
>
>
> > Hi all,
> >
> > I’m looking at the new problem.
> >
> > Although many tests fail, it seems to be a single issue with an
> > incorrect stack map in a post-processed class. I’ll let you know
> > when I find out more.
> >
> > Hannes
> >
> >> Am 09.01.2018 um 02:34 schrieb Kumar Srinivasan
> >> <[email protected]>:
> >>
> >>
> >> Hi Remi, Evgeny, Eric,
> >>
> >> [ have included Hannes Wallnoefer, who is handling nashorn related
> >> issues]
> >>
> >> Thanks that seems to fix the issue I was seeing with nasgen.
> >>
> >> However there are multiple failures most of them are nashorn
> >> regresssions,
> >> and relating to verification and stackmap frames, attached some
> >> output, for
> >> reference, I take it you want the class files ? If so I will try
> >> to provide it tomorrow.
> >> Please let me know if you need anything else.
> >>
> >> Thanks
> >> Kumar
> >> [testng] Exception in thread "main" java.lang.VerifyError:
> >> Inconsistent stackmap frames at branch target 49
> >> [testng] Exception Details:
> >> [testng] Location:
> >> [testng]
> >> jdk/nashorn/internal/objects/Global.newAccessorDescriptor(Ljava/lang/Object;Ljava/lang/Object;ZZ)Ljdk/nashorn/internal/runtime/PropertyDescriptor;
> >> @49: aload_2
> >> [testng] Reason:
> >> [testng] Type
> >> 'jdk/nashorn/internal/objects/AccessorPropertyDescriptor'
> >> (current frame, locals[5]) is not assignable to
> >> 'jdk/nashorn/internal/objects/NativeRegExp' (stack map,
> >> locals[5])
> >> [testng] Current Frame:
> >> [testng] bci: @36
> >> [testng] flags: { }
> >> [testng] locals: { 'jdk/nashorn/internal/objects/Global',
> >> 'java/lang/Object', 'java/lang/Object', integer, integer,
> >> 'jdk/nashorn/internal/objects/AccessorPropertyDescriptor' }
> >> [testng] stack: { 'java/lang/Object' }
> >> [testng] Stackmap Frame:
> >> [testng] bci: @49
> >> [testng] flags: { }
> >> [testng] locals: { 'jdk/nashorn/internal/objects/Global',
> >> 'java/lang/Object', 'java/lang/Object', integer, integer,
> >> 'jdk/nashorn/internal/objects/NativeRegExp' }
> >> [testng] stack: { }
> >> [testng] Bytecode:
> >> [testng] 0000000: bb03 0359 1d15 042b c700 09b2 02ba a700
> >> [testng] 0000010: 042b 2cc7 0009 b202 baa7 0004 2c2a b703
> >> [testng] 0000020: 063a 052b c700 0d19 0513 0307 03b6 030b
> >> [testng] 0000030: 572c c700 0d19 0513 030c 03b6 030b 5719
> >> [testng] 0000040: 05b0
> >> [testng] Stackmap Table:
> >> [testng]
> >> full_frame(@17,{Object[#2],Object[#708],Object[#708],Integer,Integer},{Uninitialized[#0],Uninitialized[#0],Integer,Integer})
> >> [testng]
> >> full_frame(@18,{Object[#2],Object[#708],Object[#708],Integer,Integer},{Uninitialized[#0],Uninitialized[#0],Integer,Integer,Object[#708]})
> >> [testng]
> >> full_frame(@28,{Object[#2],Object[#708],Object[#708],Integer,Integer},{Uninitialized[#0],Uninitialized[#0],Integer,Integer,Object[#708]})
> >> [testng]
> >> full_frame(@29,{Object[#2],Object[#708],Object[#708],Integer,Integer},{Uninitialized[#0],Uninitialized[#0],Integer,Integer,Object[#708],Object[#708]})
> >> [testng] append_frame(@49,Object[#784])
> >> [testng] same_frame(@63)
> >> [testng]
> >> [testng] at
> >> jdk.scripting.nashorn/jdk.nashorn.internal.runtime.Context.newGlobal(Context.java:1240)
> >> [testng] at
> >> jdk.scripting.nashorn/jdk.nashorn.internal.runtime.Context.createGlobal(Context.java:1231)
> >> [testng] at
> >> jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:171)
> >> [testng] at
> >> jdk.scripting.nashorn/jdk.nashorn.tools.Shell.main(Shell.java:150)
> >> [testng] at
> >> jdk.scripting.nashorn/jdk.nashorn.tools.Shell.main(Shell.java:126)
> >> [testng]
> >>
> >>
> >>> Hi Kumar,
> >>>
> >>> FYI I reported https://gitlab.ow2.org/asm/asm/issues/317805
> >>> yesterday
> >>> and to me seems that nashorn can be affected affected at least by
> >>> this one as following:
> >>> org.objectweb.asm.Type.getOpcode(Opcodes.IRETURN)
> >>> is used by
> >>> org.objectweb.asm.commons.InstructionAdapter#areturn
> >>> which in his turn is used by
> >>> jdk.nashorn.internal.runtime.linker.JavaAdapterBytecodeGenerator
> >>>
> >>> Hope this helps.
> >>>
> >>> Regards,
> >>> Evgeny
> >>>
> >>>
> >>> On Mon, Jan 8, 2018 at 7:24 PM Kumar Srinivasan
> >>> <[email protected]> wrote:
> >>>
> >>> Hi Eric,
> >>>
> >>> We have encountered a regression in nasgen/nashorn, in our
> >>> internal testing,
> >>> will file ASM bug when we have more information.
> >>>
> >>>
> >>> Kumar
> >>>
> >>>> The ASM 6.1-beta version has been released.
> >>>>
> >>>> Besides a new V10 constant for Java 10 class files, there are no
> >>>> new features. However, internally, a lot of changes have been
> >>>> made (see below; almost each line of code has changed). These
> >>>> extensive changes may have introduced some regressions, so
> >>>> please test this version thoroughly and report any bugs found,
> >>>> before we release the 6.1 version.
> >>>>
> >>>> Release notes:
> >>>>
> >>>> - xml package deprecated
> >>>> - project layout changed to Maven style
> >>>> - build system changed from Ant to Gradle
> >>>> - coding style changed to Google Java style
> >>>> - code quality and readability improved a lot
> >>>> - code quality tracked with SonarQube
> >>>> (http://sonarqube.ow2.org/projects)
> >>>> - performance improvements
> >>>> - unit tests improved: migrated to JUnit 5, faster, coverage >
> >>>> 95%
> >>>> - benchmarks improved: now use JMH
> >>>> (http://openjdk.java.net/projects/code-tools/jmh)
> >>>> - new Gitlab Continuous Integration pipeline
> >>>> - small bug fixes related to modules. See
> >>>> * https://gitlab.ow2.org/asm/asm/merge_requests/20/
> >>>> * https://gitlab.ow2.org/asm/asm/merge_requests/19/
> >>>> - bug fixes:
> >>>> * #317800: Resizing jump instruction adds invalid stack frame
> >>>> to a class without frames
> >>>>
> >>>> Backward binary compatibility is preserved, but the behavior at
> >>>> runtime has changed in a few areas:
> >>>> - ACC_SYNTHETIC flag vs Synthetic attribute, see
> >>>> https://gitlab.ow2.org/asm/asm/merge_requests/17
> >>>> - numbering of synthetic parameters: see
> >>>> https://gitlab.ow2.org/asm/asm/merge_requests/56
> >>>> - StringBuffer no longer used in util (Printer.buf deprecated,
> >>>> use stringBuilder instead)
> >>>>
> >>>> The ASM team
> >>>>
> >>>>
> >>>
> >>> --
> >>> You receive this message as a subscriber of the [email protected]
> >>> mailing list.
> >>> To unsubscribe: mailto:[email protected]
> >>> For general help: mailto:[email protected]?subject=help
> >>> OW2 mailing lists service home page: http://www.ow2.org/wws
> >>>
> >>>
>
>
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws