One working example certainly doesn't prove absence of a bug :)
But yes, I must have gotten my bash aliases wrong, the reported error
is only printed by the Java 8 version of javap, in 9 it works as expected.

One small bit remains:
If I let our compiler emit CONSTANT_Utf8_info for the module name
without a wrapper CONSTANT_Module_info javap does happily accept this.
"java --list-modules" rejects this, though.

other than that: sorry for the noise,
Stephan

On 01.07.2017 18:01, Remi Forax wrote:
Hi Stephan,
there is something wrong from your side, it works for me :)

/usr/jdk/jdk-9-b175/bin/javap --module-path target/main/exploded/ --module 
fr.umlv.asm.test module-info
Compiled from "module-info.java"
module fr.umlv.asm.test {
   requires java.base;
   requires org.objectweb.asm.all.debug;
   exports fr.umlv.asm.test;
}

/usr/jdk/jdk-9-b175/bin/javap -m java.base module-info
Compiled from "module-info.java"
module java.base@9 {
   exports sun.reflect.generics.reflectiveObjects to
     java.desktop;
   exports java.util;
   exports java.lang.ref;
   exports jdk.internal.misc to
     java.rmi,
     java.sql,
     jdk.jshell,
...

cheers,
Rémi

----- Mail original -----
De: "Stephan Herrmann" <stephan.herrm...@berlin.de>
À: jigsaw-dev@openjdk.java.net
Envoyé: Samedi 1 Juillet 2017 17:08:20
Objet: javap cannot read module-info.class

compile an arbitrary module-info.java and then:

$ javap module-info.class
  Error: error while reading constant pool for /tmp/bin/module-info.class:
  unexpected tag at #5: 19

 From tweaking the Eclipse compiler it seems that javap is expecting a
CONSTANT_Utf8_info,
where according to JVMS 4.7.25 a CONSTANT_Module_info is required.

JVMS and javac agree, so javap is the odd man out.

Stephan

PS: build is 9+175

Reply via email to