You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "rootvector2 (via GitHub)" <gi...@apache.org> on 2026/07/03 17:14:00 UTC

Re: [PR] Read unsigned bytecode operands in CodeHTML disassembler [commons-bcel]

rootvector2 commented on PR #511:
URL: https://github.com/apache/commons-bcel/pull/511#issuecomment-4878256360

   good question, i went digging after this one. the class-file model path already reads everything unsigned: the `generic/*` instruction reads and the `classfile/*` attribute parsers pull cp indices, local-var indices and counts with `readUnsignedShort`, and `Utility.codeToString` reads its operands unsigned too, so `CodeHTML` was the outlier that had drifted from the reference. the signed reads left in both disassemblers are operands that are genuinely signed: branch offsets, `IINC` increment, `SIPUSH`/`BIPUSH` constants, and the `NEWARRAY` atype byte. the only borderline one is `StackMapType` reading its tag with `readByte()`, but `checkType` pins it to 0..8 so signed vs unsigned can't change the result there. didn't spot any other real misread.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org