jextract throws "Invalid Cursor kind value: 602"

ahoj.41 at seznam.cz ahoj.41 at seznam.cz
Mon Apr 4 01:36:34 UTC 2022


Hello,




I'd like to report an issue of `jextract` tool and corresponding API `jdk.
incubator.jextract.JextractTool#main` that throws NoSuchElementException 
with message "Invalid Cursor kind value: 602" when called on [winfsp.h][1].




The exception is thrown from method jdk.internal.clang.CursorKind#valueOf
(int) and is likely caused by missing enum item of jdk.internal.clang.
CursorKind corresponding to jdk.internal.clang.libclang.Index_h#CXCursor_
StaticAssert().




Environment:

Windows 10 64b

Early access build 19-panama+1-13 (2022/1/18) SOURCE=".:git:d8c0fe5918cb"




Steps to reproduce:




1. Download directory https://github.com/winfsp/winfsp/tree/7527155cb87c382
cab1848b5bf65910c2dead291/inc/winfsp. E.g. into `C:\tmp`.


2. Run snippet




```

JextractTool.main(new String[] {
        "--source",
        "-d", "jextract-demo",
        "-t", "jextract.demo",
        "-I", "C:\\tmp",
        "--include-function", "FspWin32FromNtStatus",
        "C:\\tmp\\winfsp\\winfsp.h"
});


```




Expected result: no exception is thrown




Actual result:




NoSuchElementException is thrown.




Adam





[1]: https://github.com/winfsp/winfsp/blob/7527155cb87c382cab1848b5bf65910c2
dead291/inc/winfsp/winfsp.h





More information about the panama-dev mailing list