[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bcel-dev
Subject:    DO NOT REPLY [Bug 18323]  -
From:       bugzilla () apache ! org
Date:       2004-05-13 14:19:24
Message-ID: 20040513141924.7167.qmail () nagoya ! betaversion ! org
[Download RAW message or body]

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=18323>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=18323

Size of LDC_W's operand can be incorrect





------- Additional Comments From twright@bbn.com  2004-05-13 14:19 -------
One example is the JDK 1.4 compiled java.math.BigInteger.  If you run:
  `javap -c java.math.BigInteger | grep ldc_w`
you will find several examples of LDC_W operands with sub-256 indices:
   401: ldc_w   #268; //int 2147483647
   1835:        ldc_w   #435; //String 0000000[..]
   2691:        ldc_w   #259; //int 1162261467
   2702:        ldc_w   #260; //int 1220703125
   2709:        ldc_w   #247; //int 362797056
   2716:        ldc_w   #267; //int 1977326743
   2729:        ldc_w   #248; //int 387420489
   2736:        ldc_w   #258; //int 1000000000
    ...
Without the above patch, a BCEL lifted and regenerated BigInteger will generate
the following broken classfile:
   434: ldc_w   #268; //int 2147483647
   1868:        ldc_w   #435; //String 0000000[..]
   2724:        ldc_w   #259; //int 1162261467
   2735:        ldc_w   #260; //int 1220703125
   2742:        ldc_w   #63311; //BOGUS_TAG:100 <Incorrect CP index:63311>
   2748:        ldc_w   #267; //int 1977326743
   2761:        ldc_w   #63567; //BOGUS_TAG:100 <Incorrect CP index:63567>
   2767:        ldc_w   #258; //int 1000000000
    ...
Note that 63311 = 247*256 + 79, and the instruction following the ldc_w is an
iastore (opcode 79).

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic