RFR: 7903673: Jextract throws NPE when generating enum constant javadoc [v2]
Athijegannathan Sundararajan
sundar at openjdk.org
Mon Feb 19 15:49:07 UTC 2024
On Mon, 19 Feb 2024 15:27:26 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> This PR fixes `TreeMaker` so that it doesn't try to generate javadoc for `null` enum constants.
>>
>> Unfortunately I was not able to reproduce on Linux. The problem seems to appear on MacOS when extracting this enum:
>>
>>
>> enum __CFByteOrder {
>> CFByteOrderUnknown,
>> CFByteOrderLittleEndian,
>> CFByteOrderBigEndian
>> };
>>
>>
>> But there doesn't seem to be anything peculiar with this (and this does work when extracted in isolation).
>> It might indicate a deeper issue in libclang. For now, I made the code more robust, so that it handles possible null enum constants (these are left out from the IR).
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review comment
LGTM
I was able to reproduce NPE on MacOS / x64 without patch. With the current patch, I tried extracting user headers on Mac OS/x64. No more NPE.
-------------
Marked as reviewed by sundar (Committer).
PR Review: https://git.openjdk.org/jextract/pull/219#pullrequestreview-1888734590
PR Comment: https://git.openjdk.org/jextract/pull/219#issuecomment-1952730659
More information about the jextract-dev
mailing list