Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

The n4/o class from CID bafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqq failed to parse because the DALvik bytecode parser was missing support for the const-wide/32 instruction (opcode 0x17).

Changes

  • dalvikBytecodeParser.ts: Implemented const-wide/32 (opcode 0x17) parser using format 31i, following the same pattern as const-wide/16 (0x16) and const-wide (0x18)
  • smaliParser.ts: Added const-wide/32 to operationsWithBigintValue set for correct BigInt value handling
  • dalvikExecutableParserAgainstSmaliParser.test.ts: Added n4/o test case

The const-wide/32 instruction sign-extends a 32-bit value to 64-bit, bridging the gap between const-wide/16 (16-bit) and const-wide (64-bit) in the instruction set.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add bafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqq + n4/o parseDexAgainstSmaliMacro test like others and make it pass</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Implemented missing const-wide/32 (opcode 0x17) parser in dalvikBytecodeParser.ts
- Added const-wide/32 to smaliParser's operationsWithBigintValue set
- Added n4/o test case to testCasesByCid for CID bafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqq
- All 44 tests now passing

Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19325591317

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 12 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 94.017%

Files with Coverage Reduction New Missed Lines %
build/arbitraryZip.js 2 94.17%
build/dalvikBytecodeParser.js 3 97.75%
build/smaliParser.js 7 96.11%
Totals Coverage Status
Change from base Build 19325583102: -0.02%
Covered Lines: 7700
Relevant Lines: 8185

💛 - Coveralls

@coveralls
Copy link

coveralls commented Nov 13, 2025

Pull Request Test Coverage Report for Build 19325743291

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 9 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.001%) to 94.176%

Files with Coverage Reduction New Missed Lines %
build/arbitraryZip.js 2 94.17%
build/smaliParser.js 7 96.45%
Totals Coverage Status
Change from base Build 19325722341: 0.001%
Covered Lines: 7722
Relevant Lines: 8195

💛 - Coveralls

Copilot AI changed the title [WIP] Add parseDexAgainstSmaliMacro test to pass like others Add const-wide/32 bytecode parser and n4/o test case Nov 13, 2025
Copilot AI requested a review from futpib November 13, 2025 08:48
@futpib futpib marked this pull request as ready for review November 13, 2025 08:48
@futpib futpib merged commit d8e14a8 into master Nov 13, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bafybeiebe27ylo53trgitu6fqfbmba43c4ivxj3nt4kumsilkucpbdxtqq + n4/o parseDexAgainstSmaliMacro test like others and make it pass

3 participants