Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: never return arch as aarch64 when running in a 32-bit JVM #1128

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/main/java/org/sqlite/util/OSInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ static String resolveArmArchType() {
// Use armv5, soft-float ABI
return "arm";
} else if (armType.startsWith("aarch64")) {
// Use arm64
return "aarch64";
boolean is32bitJVM = "32".equals(System.getProperty("sun.arch.data.model"));
if (is32bitJVM) {
// An aarch64 architecture should support armv7
return "armv7";
} else {
// Use arm64
return "aarch64";
}
}

// Java 1.8 introduces a system property to determine armel or armhf
Expand Down
Loading