Repository navigation
fix: v0.10.1 P0 declaration, constructor boundary, and retarget soundness - #37
Merged
Merged
Conversation
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.
Summary
This release-hardening patch release (
v0.10.1) resolves all P0-level unsoundness and uncompilability bugs discovered during the full 1,298-class audit oftestdata/external/bundletool-install-time.aabon top ofv0.10.0:SourceAssignmentForwarddeclaration & rewrite unwrapping (classparser/decompiler/rewriter)unwrapAssignStatement/rewrapAssignStatementand wiredSourceAssignmentForwardunwrapping acrossrewrite_var.go,declaration_dominance.go,missing_local_declaration.go,declaration_barriers.go,dispatch_local_hoist.go,widen_structured.go, andwiden_instanceof.go.DUPLICATE_LOCALandUNDECLARED_VARfailures caused when declaration placement, dominance, barrier, and widening passes skippedCustomStatement-wrapped source assignments.IsThisAliasboundary & post-superfield-store gating (classparser/constructor_source_boundary.go,classparser/constructor_retain_prefix.go)ref.IsThisAliasin bothPrecisionandRetainUnprovedSourcemodes whenJDEC_THIS_ALIAS_SUPER_OFFis unset (failing closed inPrecisionmode instead of emitting misplacedsuper/thiscalls after alias setup).this-alias receiver copies (foldRetainedConstructorPrefix) and guarded pure post-superthis.<field> = <pure_rhs>stores viacanCommitWithRemainingThisFieldStores+values.InspectAccessside-effect/aliasing checks before hoistingsuper/this(...)first.retargetAssignToTypedSiblingdeclaration & forward-scope guard (classparser/hardjar_shape.go)var20 = null;->Object var20 = null;) and restricted declared-type lookup to text strictly preceding the assignment (member[:relIdent]), updating only the targeted occurrence.if/switch/sync/parallelArmhoist unification (classparser/decompiler/rewriter/rewrite_var.go)unifyHoistedAssignTargets,replaceVarInStatements, andfindAssignReadAfterByIdentity(kill-switchJDEC_IF_HOIST_IDENTITY_OFF=1).ifHoistDeclarations,switchHoistDeclarations,syncHoistDeclarations, andparallelArmDeclHoistto unify hoisted declaration identities and rewrite in-body reads/writes as well as trailing statements, preventingresolveLocalNameCollisionsorsourceWithoutDeadLocalStoresfrom stranding or dropping live locals.javajive.Versionto"0.10.1"(javajive.go).classparser/decompiler/rewriter/source_assignment_forward_test.go,classparser/constructor_retain_prefix_test.go, andclassparser/hardjar_shape_test.go, and updatedtools/requiredci/main.go.Verification
bundletool-install-time.aab(--best-effort, 1,298.javafiles,status=complete,0 warnings): scope-aware P0 audit reportsCTOR_SUPER_OR_THIS_NOT_FIRST=0,DUPLICATE_LOCAL=0,UNDECLARED_VAR_LINES=0 DISTINCT=0, and 12-category deep scanALL CLEAN (0 hits).go run ./tools/requiredci -checkgo run ./tools/requiredci -run contractgo run ./tools/requiredci -run algorithmgo run ./tools/requiredci -run dexgo run ./tools/requiredci -run corpusgo test -tags javajive_full_jdk ./classparser -run "^(TestJDKCompressedCatalogMatchesSource|TestJDKCompressedConstructorCodeMatchesSource|TestAdversarialPlatformConstructorCodeIdentityAndEffectProof|TestAdversarialPlatformIndexedDeclarationsRetainOriginalBytecode)$"go vet ./...CGO_ENABLED=0 go build ./...&CGO_ENABLED=0 go build -tags javajive_full_jdk ./...JAVAJIVE_EXTERNAL_EVAL=1 go test -v -count=1 ./test/external(TestExternalJModAndJImageskipped withoutJAVAJIVE_JIMAGE_INTEGRATION=1/ JDK)go test . ./cmd/javajive&go run ./cmd/javajive version(javajive 0.10.1)git diff --check