Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

The dalvikExecutableUnparser roundtrip test failed with seed=815925079 due to incorrect method matching in the parameterAnnotations sorting logic.

Problem

The parser's sorting logic for parameterAnnotations only compared method.name and method.prototype.shorty, ignoring method.class. This caused false matches between methods from different classes with identical names and shorty descriptors (e.g., LA/_;.<init> vs La/A;.<init>).

Fix

Use the existing dalvikExecutableMethodEquals function for full method signature comparison:

// Before: incomplete comparison
const indexA = allMethods.findIndex(m => 
    m.method.name === a.method.name && 
    m.method.prototype.shorty === a.method.prototype.shorty
);

// After: full signature comparison including class, returnType, and parameters
const indexA = allMethods.findIndex(m => dalvikExecutableMethodEquals(m.method, a.method));
Original prompt

fix this test dalvikExecutableUnparser › dalvikExecutableUnparser roundtrip (with seed=815925079)


💡 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.

Copilot AI and others added 2 commits November 28, 2025 20:53
…mparison

Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
Co-authored-by: futpib <4330357+futpib@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix dalvikExecutableUnparser roundtrip test Fix parameterAnnotations sorting to use full method signature comparison Nov 28, 2025
Copilot AI requested a review from futpib November 28, 2025 21:00
Copilot finished work on behalf of futpib November 28, 2025 21:00
@futpib futpib marked this pull request as ready for review November 28, 2025 22:17
@coveralls
Copy link

coveralls commented Nov 28, 2025

Pull Request Test Coverage Report for Build 19773671635

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 60 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.2%) to 93.362%

Files with Coverage Reduction New Missed Lines %
build/dalvikExecutableUnparser/sectionUnparsers.js 2 91.9%
build/arbitraryDalvikBytecode.js 3 99.56%
build/dalvikBytecodeUnparser.js 3 87.64%
build/dalvikBytecodeUnparser/formatUnparsers.js 12 93.45%
build/dalvikExecutableParser.js 40 89.38%
Totals Coverage Status
Change from base Build 19773511143: 0.2%
Covered Lines: 12705
Relevant Lines: 13558

💛 - Coveralls

@futpib futpib merged commit b6d5e93 into master Nov 28, 2025
4 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.

3 participants