Repository navigation
Upstream recent changes from Android - #103
Merged
Merged
Conversation
Test: m android-smali Test: ./gradlew assemble Change-Id: I74961a1c88d0de8055ecf5ca7b35557286044369
Correct the count validation logic in StringUtils.repeat. Previously, a count of 0 or 1 was incorrectly treated as invalid, and a negative count did not throw an IllegalArgumentException. Test: ./gradlew :dexlib2:test Flag: EXEMPT bugfix TAG=agy CONV=8b50a6b3-6ed8-4255-859d-a4739fc9b48a Change-Id: I7d0118a22fb468d6e49620d82d1674f6da989eb0
Regenerated the smali parser, lexer, and tree walker using updated scripts that use relative paths. This avoids embedding absolute paths of the build environment in the generated Java files. Updated the helper scripts to cd to the project directory before running the generators: - smali/run_antlr.sh - smali/run_jflex.sh Bug: None Test: ./gradlew clean test -x :smali:generateGrammarSource -x :smali:jflex Flag: EXEMPT refactoring TAG=agy CONV=7fa249f9-41b5-437f-baeb-29303ea91886 Change-Id: I69c20fe194b4bd068b72fd808309baa38bbbc65d
Eagerly read and validate mapSize to ensure it does not extend beyond the container bounds. Also validate mapOffset. This prevents ArrayIndexOutOfBoundsException when parsing malformed DEX files with corrupted map size/offset. Test: test on corrupt apk Change-Id: I3e805ebe8a1deb5e24713e7c2846daccb5221587
Making getDebugOffset() public allows external tools to access the debug offset and calculate method/class sizes while properly handling debug info duplication. Change-Id: I56321c16d0ee6769c9fbd7041d826ef7dcb6b150
Replacing Collections.emptySortedSet() (which requires API 26) with Collections.unmodifiableSortedSet(new TreeSet()) to support API 23. Bug: 285129432 Test: ./gradlew :dexlib2:test Flag: NONE tool compatibility fix TAG=agy CONV=1ea891e6-8562-4a15-8bba-16a2d9b01b34 Change-Id: I6880b22ff0b455128e9bd1572ac2a0e177b6767e
Improve ZipDexContainer to handle invalid dex entries. It now allows registering invalid entries and throws when they are accessed, or ignores them if configured to do so. Also update DexBackedDexFile to throw InvalidFile instead of IndexOutOfBoundsException for invalid offsets. Bug: 285129432 Test: ./gradlew :dexlib2:test TAG=agy CONV=1ea891e6-8562-4a15-8bba-16a2d9b01b34 Change-Id: I7cba6f96809be00aca247dcc7c22b5ac1f988b3f
In OatHeader.getKeyValue(String key), when iterating through key-value store, if the current key k didn't match the requested key, offset was incremented by only 1 byte (moving it to the value), causing the loop to treat the value as a key in the next iteration. The format of the OAT key-value store is key1\0value1\0key2\0value2\0.... When a key does not match, the parser must skip BOTH the key and its corresponding value. The code only incremented offset++ once, which just skips the null terminator of the key, starting the next key search inside the value string. Change-Id: Ib8be875e9bdfe50cb88412c9399f46cc6b11f748
sgjesse
self-requested a review
July 14, 2026 13:11
sgjesse
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.