[foreign-abi] [Rev 01] RFR: 8239784: Circular initialization causes C_XXX constants to be null
Athijegannathan Sundararajan
sundar at openjdk.java.net
Fri Feb 21 16:49:15 UTC 2020
On Fri, 21 Feb 2020 16:34:07 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> See the bug for a complete description. Essentially, the problem is that
>>
>> public static void main(String[] args) {
>> System.out.println(MemoryLayouts.WinABI.C_CHAR);
>> System.out.println(MemoryLayouts.C_CHAR);
>> }
>>
>> Will print
>>
>> b8
>> null
>> Because of a circular dependency between the constants.
>>
>> The fix is to extract the constants that the platform specific classes depend on into a separate, shared class, which removes the circular dependency. (This fix was suggested by Sundar)
>
> The pull request has been updated with 1 additional commit.
Looks good!
-------------
Marked as reviewed by sundar (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/26
More information about the panama-dev
mailing list