You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java version: OpenJDK 64-Bit Server VM v11.0.4+11-post-Debian-1bpo91 by Debian
Platform: Linux x86_64
Module: llvm
Description
The static method clang_getCString in ClangIndex in the llvm module returns garbage characters. I think that may because native clang_getCString expects a CXString struct passed as value, but lwjgl passes a Pointer/long address?? I'm not sure about that and I'm new to lwjgl.
The Clang API is heavily used in the Template Extraction tool in LWJGL, but I never tested it on Linux. On Windows, >64bit structs are passed by pointer, so the bindings worked there correctly by accident.
fayer3
pushed a commit
to fayer3/lwjgl3
that referenced
this issue
Jul 14, 2023
Environment
3.2.2
10
OpenJDK 64-Bit Server VM v11.0.4+11-post-Debian-1bpo91 by Debian
Linux x86_64
llvm
Description
The static method clang_getCString in ClangIndex in the llvm module returns garbage characters. I think that may because native clang_getCString expects a CXString struct passed as value, but lwjgl passes a Pointer/long address?? I'm not sure about that and I'm new to lwjgl.
I have attached a minimum test case illustrating the problem.
CXStringTest.java.txt
Note that the test case also shows you can properly get the String by getting the address of the first member of the CXString struct:
The text was updated successfully, but these errors were encountered: