Skip to content

Commit

Permalink
fix(core) replace intptr_t with uintptr_t. Close #720
Browse files Browse the repository at this point in the history
This fixes pointer casts on 32-bit architectures. Previously, addresses
that happened to be greater than 2GB on x86/arm32 would overflow when
cast to intptr_t and, via the cast to jlong, propagate as negative
values to Java code.
  • Loading branch information
Spasi committed Feb 7, 2022
1 parent b01996b commit 0db2149
Show file tree
Hide file tree
Showing 294 changed files with 10,093 additions and 10,092 deletions.
1 change: 1 addition & 0 deletions doc/notes/3.3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This build includes the following changes:
#### Fixes

- Core: Fixed extra `NUL` in string returned from `SharedLibrary::getPath()` on Linux & macOS. (#713)
- Core: Fixed integer overflow when casting pointers on 32-bit architectures. (#720)
- Core: Fixed rare `NPE` with `Configuration.DEBUG_STACK` enabled. (#721)
- vma: Fixed nullability of `VmaVirtualAllocationCreateInfo::pUserData` member.
- Vulkan: All `noautovalidity` parameters/members are now regarded as nullable. (#702)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,7 @@ class Func(

if (nativeClass.binding != null) {
if (hasFunctionAddressParam) {
println("$t${nativeName}PROC $nativeName = (${nativeName}PROC)(intptr_t)$FUNCTION_ADDRESS;")
println("$t${nativeName}PROC $nativeName = (${nativeName}PROC)(uintptr_t)$FUNCTION_ADDRESS;")
} else
println("$t${nativeName}PROC $nativeName = (${nativeName}PROC)tlsGetFunction(${nativeClass.binding.getFunctionOrdinal(this@Func)});")
}
Expand Down Expand Up @@ -1972,7 +1972,7 @@ class Func(
} else {
"($variableType)"
}
}${if (variableType != "intptr_t") "(intptr_t)" else ""}${it.name}$POINTER_POSTFIX;"
}${if (variableType != "uintptr_t") "(uintptr_t)" else ""}${it.name}$POINTER_POSTFIX;"
)
}
}
Expand Down Expand Up @@ -2016,7 +2016,7 @@ class Func(
nativeCall = "$t$callPrefix${JNI_NAME(hasArrays = true, critical = true, ignoreArrayType = true)}(${getNativeParams()
.map {
if (it.nativeType is ArrayType<*>)
"(intptr_t)${it.name}"
"(uintptr_t)${it.name}"
else
"${it.name}${if (it.nativeType is PointerType<*> || it.nativeType is StructType) POINTER_POSTFIX else ""}"
}
Expand Down Expand Up @@ -2047,15 +2047,15 @@ class Func(
print(if (it != null)
"*$it = "
else
"*((${returns.nativeType.name}*)(intptr_t)$RESULT) = "
"*((${returns.nativeType.name}*)(uintptr_t)$RESULT) = "
)
}
} else if (!returns.isVoid) {
print(if (code.nativeAfterCall != null) "$RESULT = " else "return ")
if (returns.jniFunctionType != returns.nativeType.name)
print("(${returns.jniFunctionType})")
if (returns.nativeType is PointerType<*> && nativeClass.binding == null)
print("(intptr_t)")
print("(uintptr_t)")
if (has<Address>())
print('&')
}
Expand Down
12 changes: 6 additions & 6 deletions modules/generator/src/main/kotlin/org/lwjgl/generator/JNI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ object JNI : GeneratorTargetNative(Module.CORE, "JNI") {

private val NativeType.nativeType
get() = if (this.isPointer)
"intptr_t"
"uintptr_t"
else if (this.mapping == PrimitiveMapping.CLONG)
"long"
else
Expand Down Expand Up @@ -134,10 +134,10 @@ object JNI : GeneratorTargetNative(Module.CORE, "JNI") {
print("((${it.returnType.nativeType} (${if (it.callingConvention === CallingConvention.STDCALL) "APIENTRY " else ""}*) ")
print(it.arguments.asSequence()
.joinToString(", ", prefix = "(", postfix = ")") { arg -> arg.nativeType })
print(")(intptr_t)$FUNCTION_ADDRESS)(")
print(")(uintptr_t)$FUNCTION_ADDRESS)(")
print(it.arguments.asSequence()
.mapIndexed { i, param -> if (param.isPointer)
"(intptr_t)param$i"
"(uintptr_t)param$i"
else if (param.mapping === PrimitiveMapping.CLONG)
"(long)param$i"
else
Expand Down Expand Up @@ -170,12 +170,12 @@ object JNI : GeneratorTargetNative(Module.CORE, "JNI") {
print("((${it.returnType.nativeType} (${if (it.callingConvention === CallingConvention.STDCALL) "APIENTRY " else ""}*) ")
print(it.arguments.asSequence()
.joinToString(", ", prefix = "(", postfix = ")") { arg -> arg.nativeType })
print(")(intptr_t)$FUNCTION_ADDRESS)(")
print(")(uintptr_t)$FUNCTION_ADDRESS)(")
print(it.arguments.asSequence()
.mapIndexed { i, param -> if (param is ArrayType<*>)
"(intptr_t)paramArray$i"
"(uintptr_t)paramArray$i"
else if (param.isPointer)
"(intptr_t)param$i"
"(uintptr_t)param$i"
else if (param.mapping === PrimitiveMapping.CLONG)
"(long)param$i"
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ReturnValue private constructor(override val nativeType: NativeType) : Qua
nativeType.name
} else {
if (nativeType.mapping === PrimitiveMapping.POINTER || nativeType is PointerType<*>)
"intptr_t"
"uintptr_t"
else
nativeType.jniFunctionType
}
Expand Down Expand Up @@ -109,7 +109,7 @@ class Parameter(
if (pointerMode && nativeType is StructType) "$it *" else it
}
else if (nativeType.mapping === PrimitiveMapping.POINTER || nativeType is PointerType<*>)
"intptr_t"
"uintptr_t"
else
nativeType.jniFunctionType

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,7 @@ ${validations.joinToString("\n")}
EXTERN_C_ENTER
JNIEXPORT jint JNICALL Java_${nativeFileNameJNI}_offsets(JNIEnv *$JNIENV, jclass clazz, jlong bufferAddress) {
jint *buffer = (jint *)(intptr_t)bufferAddress;
jint *buffer = (jint *)(uintptr_t)bufferAddress;
UNUSED_PARAMS($JNIENV, clazz)
""")
Expand Down Expand Up @@ -2385,7 +2385,7 @@ EXTERN_C_EXIT""")
JNIEXPORT ${it.nativeType.jniFunctionType} JNICALL Java_$signature(JNIEnv *$JNIENV, jclass clazz, jlong bufferAddress) {
UNUSED_PARAMS($JNIENV, clazz)
$nativeName *buffer = ($nativeName *)(intptr_t)bufferAddress;
$nativeName *buffer = ($nativeName *)(uintptr_t)bufferAddress;
return (${it.nativeType.jniFunctionType})buffer->$prefix${it.name};
}""")
}
Expand All @@ -2407,7 +2407,7 @@ JNIEXPORT ${it.nativeType.jniFunctionType} JNICALL Java_$signature(JNIEnv *$JNIE
JNIEXPORT void JNICALL Java_$signature(JNIEnv *$JNIENV, jclass clazz, jlong bufferAddress, ${it.nativeType.jniFunctionType} value) {
UNUSED_PARAMS($JNIENV, clazz)
$nativeName *buffer = ($nativeName *)(intptr_t)bufferAddress;
$nativeName *buffer = ($nativeName *)(uintptr_t)bufferAddress;
buffer->$prefix${it.name} = (${it.nativeType.name})value;
}""")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
EXTERN_C_ENTER

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlopen(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint mode) {
char const *filename = (char const *)(intptr_t)filenameAddress;
char const *filename = (char const *)(uintptr_t)filenameAddress;
UNUSED_PARAMS(__env, clazz)
return (jlong)(intptr_t)dlopen(filename, mode);
return (jlong)(uintptr_t)dlopen(filename, mode);
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlerror(JNIEnv *__env, jclass clazz) {
UNUSED_PARAMS(__env, clazz)
return (jlong)(intptr_t)dlerror();
return (jlong)(uintptr_t)dlerror();
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlsym(JNIEnv *__env, jclass clazz, jlong handleAddress, jlong nameAddress) {
void *handle = (void *)(intptr_t)handleAddress;
char const *name = (char const *)(intptr_t)nameAddress;
void *handle = (void *)(uintptr_t)handleAddress;
char const *name = (char const *)(uintptr_t)nameAddress;
UNUSED_PARAMS(__env, clazz)
return (jlong)(intptr_t)dlsym(handle, name);
return (jlong)(uintptr_t)dlsym(handle, name);
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlclose(JNIEnv *__env, jclass clazz, jlong handleAddress) {
void *handle = (void *)(intptr_t)handleAddress;
void *handle = (void *)(uintptr_t)handleAddress;
UNUSED_PARAMS(__env, clazz)
return (jint)dlclose(handle);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
EXTERN_C_ENTER

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_nopen(JNIEnv *__env, jclass clazz, jlong pathnameAddress, jint flags, jint mode) {
char const *pathname = (char const *)(intptr_t)pathnameAddress;
char const *pathname = (char const *)(uintptr_t)pathnameAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)open(pathname, flags, (mode_t)mode);
Expand All @@ -19,7 +19,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_nopen(JNIEnv *__env, jc
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_nopenat(JNIEnv *__env, jclass clazz, jint dirfd, jlong pathnameAddress, jint flags, jint mode) {
char const *pathname = (char const *)(intptr_t)pathnameAddress;
char const *pathname = (char const *)(uintptr_t)pathnameAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)openat(dirfd, pathname, flags, (mode_t)mode);
Expand All @@ -28,7 +28,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_nopenat(JNIEnv *__env,
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_ncreat(JNIEnv *__env, jclass clazz, jlong pathnameAddress, jint mode) {
char const *pathname = (char const *)(intptr_t)pathnameAddress;
char const *pathname = (char const *)(uintptr_t)pathnameAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)creat(pathname, (mode_t)mode);
Expand All @@ -53,7 +53,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_nfcntli(JNIEnv *__env,
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_FCNTL_nfcntlp(JNIEnv *__env, jclass clazz, jint fd, jint cmd, jlong argAddress) {
void *arg = (void *)(intptr_t)argAddress;
void *arg = (void *)(uintptr_t)argAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)fcntl(fd, cmd, arg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
EXTERN_C_ENTER

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_MMAN_mmap(JNIEnv *__env, jclass clazz, jlong addrAddress, jlong length, jint prot, jint flags, jint fd, jlong offset) {
void *addr = (void *)(intptr_t)addrAddress;
void *addr = (void *)(uintptr_t)addrAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)(intptr_t)mmap(addr, (size_t)length, prot, flags, fd, (off_t)offset);
__result = (jlong)(uintptr_t)mmap(addr, (size_t)length, prot, flags, fd, (off_t)offset);
saveErrno();
return __result;
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_MMAN_nmunmap(JNIEnv *__env, jclass clazz, jlong addrAddress, jlong length) {
void *addr = (void *)(intptr_t)addrAddress;
void *addr = (void *)(uintptr_t)addrAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)munmap(addr, (size_t)length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
EXTERN_C_ENTER

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_Stat_nstat(JNIEnv *__env, jclass clazz, jlong __fileAddress, jlong __bufAddress) {
char const *__file = (char const *)(intptr_t)__fileAddress;
struct stat *__buf = (struct stat *)(intptr_t)__bufAddress;
char const *__file = (char const *)(uintptr_t)__fileAddress;
struct stat *__buf = (struct stat *)(uintptr_t)__bufAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)stat(__file, __buf);
Expand All @@ -20,7 +20,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_Stat_nstat(JNIEnv *__env, jcl
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_Stat_nfstat(JNIEnv *__env, jclass clazz, jint __fd, jlong __bufAddress) {
struct stat *__buf = (struct stat *)(intptr_t)__bufAddress;
struct stat *__buf = (struct stat *)(uintptr_t)__bufAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)fstat(__fd, __buf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
EXTERN_C_ENTER

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nreadv(JNIEnv *__env, jclass clazz, jint __fd, jlong __iovecAddress, jint __count) {
struct iovec const *__iovec = (struct iovec const *)(intptr_t)__iovecAddress;
struct iovec const *__iovec = (struct iovec const *)(uintptr_t)__iovecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)readv(__fd, __iovec, __count);
Expand All @@ -19,7 +19,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nreadv(JNIEnv *__env, jc
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nwritev(JNIEnv *__env, jclass clazz, jint __fd, jlong __iovecAddress, jint __count) {
struct iovec const *__iovec = (struct iovec const *)(intptr_t)__iovecAddress;
struct iovec const *__iovec = (struct iovec const *)(uintptr_t)__iovecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)writev(__fd, __iovec, __count);
Expand All @@ -28,7 +28,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nwritev(JNIEnv *__env, j
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npreadv(JNIEnv *__env, jclass clazz, jint __fd, jlong __iovecAddress, jint __count, jlong __offset) {
struct iovec const *__iovec = (struct iovec const *)(intptr_t)__iovecAddress;
struct iovec const *__iovec = (struct iovec const *)(uintptr_t)__iovecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)preadv(__fd, __iovec, __count, (off_t)__offset);
Expand All @@ -37,7 +37,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npreadv(JNIEnv *__env, j
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npwritev(JNIEnv *__env, jclass clazz, jint __fd, jlong __iovecAddress, jint __count, jlong __offset) {
struct iovec const *__iovec = (struct iovec const *)(intptr_t)__iovecAddress;
struct iovec const *__iovec = (struct iovec const *)(uintptr_t)__iovecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)pwritev(__fd, __iovec, __count, (off_t)__offset);
Expand All @@ -46,7 +46,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npwritev(JNIEnv *__env,
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npreadv2(JNIEnv *__env, jclass clazz, jint __fd, jlong __iovecAddress, jint __count, jlong __offset, jint __flags) {
struct iovec const *__iovec = (struct iovec const *)(intptr_t)__iovecAddress;
struct iovec const *__iovec = (struct iovec const *)(uintptr_t)__iovecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)preadv2(__fd, __iovec, __count, (off_t)__offset, __flags);
Expand All @@ -55,7 +55,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npreadv2(JNIEnv *__env,
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npwritev2(JNIEnv *__env, jclass clazz, jint __fd, jlong __iovecAddress, jint __count, jlong __offset, jint __flags) {
struct iovec const *__iovec = (struct iovec const *)(intptr_t)__iovecAddress;
struct iovec const *__iovec = (struct iovec const *)(uintptr_t)__iovecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)pwritev2(__fd, __iovec, __count, (off_t)__offset, __flags);
Expand All @@ -64,8 +64,8 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_npwritev2(JNIEnv *__env,
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nprocess_1vm_1readv(JNIEnv *__env, jclass clazz, jint __pid, jlong __lvecAddress, jlong __liovcnt, jlong __rvecAddress, jlong __riovcnt, jlong __flags) {
struct iovec const *__lvec = (struct iovec const *)(intptr_t)__lvecAddress;
struct iovec const *__rvec = (struct iovec const *)(intptr_t)__rvecAddress;
struct iovec const *__lvec = (struct iovec const *)(uintptr_t)__lvecAddress;
struct iovec const *__rvec = (struct iovec const *)(uintptr_t)__rvecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)process_vm_readv((pid_t)__pid, __lvec, (unsigned long int)__liovcnt, __rvec, (unsigned long int)__riovcnt, (unsigned long int)__flags);
Expand All @@ -74,8 +74,8 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nprocess_1vm_1readv(JNIE
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UIO_nprocess_1vm_1writev(JNIEnv *__env, jclass clazz, jint __pid, jlong __lvecAddress, jlong __liovcnt, jlong __rvecAddress, jlong __riovcnt, jlong __flags) {
struct iovec const *__lvec = (struct iovec const *)(intptr_t)__lvecAddress;
struct iovec const *__rvec = (struct iovec const *)(intptr_t)__rvecAddress;
struct iovec const *__lvec = (struct iovec const *)(uintptr_t)__lvecAddress;
struct iovec const *__rvec = (struct iovec const *)(uintptr_t)__rvecAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)process_vm_writev((pid_t)__pid, __lvec, (unsigned long int)__liovcnt, __rvec, (unsigned long int)__riovcnt, (unsigned long int)__flags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UNISTD_sysconf(JNIEnv *__env
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_UNISTD_nread(JNIEnv *__env, jclass clazz, jint fd, jlong bufAddress, jlong count) {
void *buf = (void *)(intptr_t)bufAddress;
void *buf = (void *)(uintptr_t)bufAddress;
jlong __result;
UNUSED_PARAMS(__env, clazz)
__result = (jlong)read(fd, buf, (size_t)count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
EXTERN_C_ENTER

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1uring_1setup(JNIEnv *__env, jclass clazz, jint entries, jlong pAddress) {
struct io_uring_params *p = (struct io_uring_params *)(intptr_t)pAddress;
struct io_uring_params *p = (struct io_uring_params *)(uintptr_t)pAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)__sys_io_uring_setup((unsigned)entries, p);
Expand All @@ -19,7 +19,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1urin
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1uring_1register(JNIEnv *__env, jclass clazz, jint fd, jint opcode, jlong argAddress, jint nr_args) {
void *arg = (void *)(intptr_t)argAddress;
void *arg = (void *)(uintptr_t)argAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)__sys_io_uring_register(fd, (unsigned)opcode, arg, (unsigned)nr_args);
Expand All @@ -28,7 +28,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1urin
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1uring_1enter2(JNIEnv *__env, jclass clazz, jint fd, jint to_submit, jint min_complete, jint flags, jlong sigAddress, jint sz) {
sigset_t *sig = (sigset_t *)(intptr_t)sigAddress;
sigset_t *sig = (sigset_t *)(uintptr_t)sigAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)__sys_io_uring_enter2(fd, (unsigned)to_submit, (unsigned)min_complete, (unsigned)flags, sig, sz);
Expand All @@ -37,7 +37,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1urin
}

JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_liburing_LibIOURing_nio_1uring_1enter(JNIEnv *__env, jclass clazz, jint fd, jint to_submit, jint min_complete, jint flags, jlong sigAddress) {
sigset_t *sig = (sigset_t *)(intptr_t)sigAddress;
sigset_t *sig = (sigset_t *)(uintptr_t)sigAddress;
jint __result;
UNUSED_PARAMS(__env, clazz)
__result = (jint)__sys_io_uring_enter(fd, (unsigned)to_submit, (unsigned)min_complete, (unsigned)flags, sig);
Expand Down
Loading

0 comments on commit 0db2149

Please sign in to comment.