-
Enhancement
-
Resolution: Fixed
-
P3
-
repo-panama
I was seeing some weird jextract errors surrounding layouts.
It turns that jdk.internal.clang.Type.getOffsetOf was being called without checking if the function returned an error code.
This error code could for instance be -5 (an enum value) [1], which blows up later on when doing layout computations.
It would be good to explicitly check for error returns.
[1] : https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#gaaf1b95e9e7e792a08654563fef7502c1
It turns that jdk.internal.clang.Type.getOffsetOf was being called without checking if the function returned an error code.
This error code could for instance be -5 (an enum value) [1], which blows up later on when doing layout computations.
It would be good to explicitly check for error returns.
[1] : https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#gaaf1b95e9e7e792a08654563fef7502c1