Repository navigation
Fall back to architecture when pointer-size model is unavailable - #55
Draft
RicheyWorks wants to merge 1 commit into
Draft
RicheyWorks wants to merge 1 commit into
RicheyWorks wants to merge 1 commit into
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.
Sizeof.computePointerSizedereferencessun.arch.data.modelwithout checking for null. If that implementation-specific property is absent, initializingSizeof.POINTERthrowsExceptionInInitializerErrorcaused byNullPointerException. For an unrecognized value it also assumes 32 bits even when the architecture is a known 64-bit family.Keep explicit
32/64model values authoritative, use null-safe comparison, and fall back to the existingLibUtils.calculateArch()classification for known 32/64-bit architectures. Retain the historical warning and 32-bit assumption for unrecognized/ambiguous architectures when the model cannot decide.Add 14 parameterized tests, each in a fresh child JVM so property overrides and
Sizeofclass initialization do not affect the test runner. Covers explicit-model precedence, missing models on x86/ARM/PowerPC/MIPS families, an unexpected model on amd64, and the unknown-architecture fallback. Baseline: 14 tests with 11 failures; fixed: 14 tests, zero failures/errors/skips under Maven/JUnit 4.13.1.Validation host is Windows x86_64/Temurin 22, with the previously disclosed isolated parent source/target 8 adaptation because upstream's Java 7 target is rejected by this JDK. No POM, JNI, native-binary or GPU change. No CUDA libraries are loaded by these tests.
These are simulated property configurations, not execution on actual 32-bit/ARM/PowerPC/MIPS machines or verification of their native ABI/libraries. The unknown-architecture 32-bit fallback remains a limitation; this change does not add new platform binaries or claim support for new CUDA platforms.