You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2014/04/24 14:25:16 UTC

[jira] [Updated] (BCEL-48) LDC_W emits output with only one parameter byte

     [ https://issues.apache.org/jira/browse/BCEL-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated BCEL-48:
-------------------------------

             Priority: Major
          Environment:     (was: Operating System: other
Platform: All)
    Affects Version/s:     (was: unspecified)
        Fix Version/s: 5.2
             Priority:   (was: P3)
             Severity:   (was: major)

> LDC_W emits output with only one parameter byte
> -----------------------------------------------
>
>                 Key: BCEL-48
>                 URL: https://issues.apache.org/jira/browse/BCEL-48
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Main
>            Reporter: development--2006--issues.apache.org
>            Assignee: Apache Commons Developers
>             Fix For: 5.2
>
>         Attachments: patch, patch
>
>
> Fixing this took me half a day :-(
> See this patch:
> Index: LDC_W.java
> ===================================================================
> RCS file: /home/cvspublic/jakarta-bcel/src/java/org/apache/bcel/generic/LDC_W.java,v
> retrieving revision 1.4
> diff -u -r1.4 LDC_W.java
> --- LDC_W.java  23 May 2003 07:55:17 -0000      1.4
> +++ LDC_W.java  3 Jul 2004 20:02:10 -0000
> @@ -82,7 +82,12 @@
>         throws IOException
>    {
>      setIndex(bytes.readUnsignedShort());
> +    /*
> +       This is wrong!! (and thus commented out)
> +       An LDC_W, which has got opcode LDC because index<256, may not change the
> opcode to LDC_W back,
> +       because then it would emit an LDC_W opcode with only ONE byte as
> parameter, leading to class file corruption.
> +    */
>      // Override just in case it has been changed
> -    opcode = org.apache.bcel.Constants.LDC_W;
> +    // opcode = org.apache.bcel.Constants.LDC_W;
>    }
>  }



--
This message was sent by Atlassian JIRA
(v6.2#6252)