You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2019/07/06 15:11:00 UTC

[jira] [Commented] (BCEL-308) NullPointerException in Verifier Pass 3A

    [ https://issues.apache.org/jira/browse/BCEL-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879692#comment-16879692 ] 

Gary Gregory commented on BCEL-308:
-----------------------------------

The {{Hello}} class file you provided is not in a Java package, therefore I cannot add it along with all of your other classes with the exact same unpackaged class name :( to our {{src/test/resources}} folder.

It would be great if you could provide class files in a package named after _something_ like jqf_0, jqf_1, and son on. This would allow us to add these files as {{src/test/resources/jqf_0/Hello.class}}, {{src/test/resources/jqf_1/Hello.class}}, and so on.

> NullPointerException in Verifier Pass 3A
> ----------------------------------------
>
>                 Key: BCEL-308
>                 URL: https://issues.apache.org/jira/browse/BCEL-308
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Verifier
>    Affects Versions: 6.2
>            Reporter: Rohan Padhye
>            Priority: Major
>         Attachments: Hello.class
>
>
> Verifier throws NPE on malformed input instead of reporting verification failure.
> h1. Steps to reproduce:
>  
> Save the attached file as "Hello.class" and run:
> java -cp <classpath> org.apache.bcel.verifier.Verifier Hello
>  
> The file Hello.class was generated automatically by the fuzzer JQF ([https://github.com/rohanpadhye/jqf]).
> h2. Expected output:
> VERIFIED_REJECTED
> h2. Observed output:
> JustIce by Enver Haase, (C) 2001-2002.
> <http://bcel.sourceforge.net>
> <http://commons.apache.org/bcel>
>  
> Now verifying: Hello
>  
> Pass 1:
> VERIFIED_OK
> Passed verification.
>  
> Pass 2:
> VERIFIED_OK
> Passed verification.
>  
> Exception in thread "main" java.lang.NullPointerException
>  at org.apache.bcel.generic.FieldOrMethod.getReferenceType(FieldOrMethod.java:116)
>  at org.apache.bcel.generic.FieldOrMethod.getLoadClassType(FieldOrMethod.java:133)
>  at org.apache.bcel.verifier.statics.Pass3aVerifier$InstOperandConstraintVisitor.visitLoadClass(Pass3aVerifier.java:521)
>  at org.apache.bcel.generic.INVOKESPECIAL.accept(INVOKESPECIAL.java:86)
>  at org.apache.bcel.generic.InstructionHandle.accept(InstructionHandle.java:302)
>  at org.apache.bcel.verifier.statics.Pass3aVerifier.pass3StaticInstructionOperandsChecks(Pass3aVerifier.java:443)
>  at org.apache.bcel.verifier.statics.Pass3aVerifier.do_verify(Pass3aVerifier.java:208)
>  at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:71)
>  at org.apache.bcel.verifier.Verifier.doPass3a(Verifier.java:89)
>  at org.apache.bcel.verifier.Verifier.main(Verifier.java:216)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)