Skip to content

Commit

Permalink
fix: never return arch as aarch64 when running in a 32-bit JVM
Browse files Browse the repository at this point in the history
Closes: #1127
  • Loading branch information
tyilo committed Jun 20, 2024
1 parent 429bbe4 commit 0c3db0b
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit 0c3db0b

Please sign in to comment.