LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.67k stars 628 forks source link

ThreadLocalUtil natives does not check for errors. #980

Open xxDark opened 1 month ago

xxDark commented 1 month ago

Question

Hello. code in question: https://github.com/LWJGL/lwjgl3/blob/master/modules/lwjgl/core/src/main/c/common_tools.h#L60-L82 If for whatever reason initialization of ThreadLocalUtil here fails, VM will silently crash. That was hard to track down. Is there any chance error checking could be added here? Similarly, https://github.com/LWJGL/lwjgl3/blob/master/modules/lwjgl/core/src/main/c/org_lwjgl_system_ThreadLocalUtil.c#L12-L14 Thanks!