Skip to content

Commit 16fa43f

Browse files
authored
Update jnr-unixsocket dependency to 0.38.24 (#10565)
Update jnr-unixsocket dependency to 0.38.24 Merge branch 'master' into mcculls/jnr-unixsocket-0.38.24 Disable use of 'sun.misc.Unsafe' by JFFI on JDK 25 and above Co-authored-by: stuart.mcculloch <stuart.mcculloch@datadoghq.com>
1 parent 326cc38 commit 16fa43f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jmh = "1.37"
4040
jmc = "8.1.0"
4141

4242
# Web & Network
43-
jnr-unixsocket = "0.38.22"
43+
jnr-unixsocket = "0.38.24"
4444
okhttp-legacy = "[3.0,3.12.12]" # 3.12.x is last version to support Java7
4545
okio = "1.17.6" # Datadog fork
4646

utils/socket-utils/src/main/java/com/kenai/jffi/PatchInit.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.kenai.jffi;
22

33
import com.kenai.jffi.internal.StubLoader;
4+
import datadog.environment.JavaVirtualMachine;
5+
import datadog.environment.SystemProperties;
46

57
/** Replacement Init class that loads StubLoader from the same (isolating) class-loader. */
68
final class PatchInit {
@@ -12,6 +14,9 @@ static void load() {
1214
if (loaded) {
1315
return;
1416
}
17+
if (JavaVirtualMachine.isJavaVersionAtLeast(25)) {
18+
SystemProperties.set("jffi.unsafe.disabled", "true");
19+
}
1520
try {
1621
if (StubLoader.isLoaded()) {
1722
loaded = true;

0 commit comments

Comments
 (0)