[
https://issues.apache.org/jira/browse/BCEL-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249701#comment-14249701
]
Emmanuel Bourg commented on BCEL-183:
-------------------------------------
Excellent patch, merci Jérôme.
If I read the JVM spec for Java 5 properly the field names had to follow the
rules of the Java language and BCEL conformed to that. This later changed with
Java 7.
https://docs.oracle.com/javase/specs/jvms/se5.0/html/ClassFile.doc.html#2877
{quote}
name_index
The value of the name_index item must be a valid index into the constant_pool
table. The constant_pool entry at that index must be a CONSTANT_Utf8_info
(§4.4.7) structure which must represent a valid field name (§2.7) stored as a
simple name (§2.7.1), that is, as a Java programming language identifier (§2.2).
{quote}
> JustIce verifier checks for field and variable name validity whereas it is
> not needed
> -------------------------------------------------------------------------------------
>
> Key: BCEL-183
> URL: https://issues.apache.org/jira/browse/BCEL-183
> Project: Commons BCEL
> Issue Type: Bug
> Components: Verifier
> Affects Versions: 5.2, 6.0
> Reporter: Jérôme Leroux
> Attachments: BCEL-183-2.patch, BCEL-183-2.zip, BCEL-183-src.zip,
> BCEL-183.patch, BCEL-183.zip
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> The JustIce bytecode verifier checks the validity of the field name and the
> variable name considering the java langage specification.
> This check is not specified by the bytecode verifier specification.
> This may lead to bytecode verification errors in pass2 on valid classfiles.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)