[PATCH][asmtools] Fix incorrect handling of quoted class names by jasm (original) (raw)

Maxim Degtyarev mdegtyarev at gmail.com
Tue Mar 6 16:26:40 UTC 2018


It seems file attach lost somewhere in the middle. Does this mailing list support attaches? Here is the patch:

=====

HG changeset patch

User maccimo

Date 1520137328 -10800

Sun Mar 04 07:22:08 2018 +0300

Node ID 2704790eab9c060bc0ba3f3c29a31e95379224f4

Parent 872f704a0d9a0198ae7ce1ae12a676cb180fd424

Fix quoted class names handling bug. Quoted class names was not prepended by proper package name even if *.jasm file contains "package" statement.

diff --git a/src/org/openjdk/asmtools/jasm/Parser.java b/src/org/openjdk/asmtools/jasm/Parser.java --- a/src/org/openjdk/asmtools/jasm/Parser.java +++ b/src/org/openjdk/asmtools/jasm/Parser.java @@ -416,6 +416,7 @@ case STRINGVAL: v = scanner.stringValue; scanner.scan();

@@ -435,12 +436,7 @@ case IDENT: v = scanner.idValue; scanner.scan();

identifier doesn't contain "/"

identifier doesn't contain "["

@@ -450,6 +446,16 @@ } }

identifier doesn't contain "/"

identifier doesn't contain "["

 /**
  * Parse a signed integer of size bytes long.

=====

2018-03-06 18:42 GMT+03:00 Kevin Looney <kevin.looney at oracle.com>:

Hello Maxim,

Thanks for identifying the issue in asmtools.

The following patch address quoted class names handling bug in asmtools_ _jasm. Did you forget to attach the patch? - or are you simply reporting a problem without a fix? Thanks in advance, Regards, Kevin L Manager - Conformance tools

On 3/3/18 9:22 PM, Maxim Degtyarev wrote: The following patch address quoted class names handling bug in asmtools_ _jasm. Quick example: Following code will produce class TestQuoted in top-level package ignoring package, specified by the "package" statement. After removing quotes around class name resulting class file will contain class pkg.TestQuoted as expected.

package pkg; super public class "TestQuoted" version 52:0 { public Method "":"()V" stack 1 locals 1 { aload0; invokespecial Method java/lang/Object."":"()V"; return; } } // end Class TestQuoted -- kevin.looney at oracle.com



More information about the code-tools-dev mailing list