RFR: 7903158: jextract crashes due to name clash with pointer to function typedefs

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Apr 13 15:17:38 UTC 2022


On Wed, 13 Apr 2022 15:01:39 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> suffixing $ like it is done already for exception variable in the same source file. Piggybacking to remove unused jtreg header is another test

src/main/java/org/openjdk/jextract/impl/FunctionalInterfaceBuilder.java line 113:

> 111:             incrAlign();
> 112:             indent();
> 113:             append(MEMBER_MODS + " " + className() + " ofAddress(MemoryAddress addr$, ResourceScope scope$) {\n");

This patch seems to fix the names in the factory - but in reality the clash happens because of the choice of the parameter names inside the lambda body. I would prefer to alter the lambda parameter names instead, as those are private to the implementation.

test/java/org/openjdk/jextract/test/toolprovider/Test7903148.java line 31:

> 29: import static org.testng.Assert.assertNotNull;
> 30: 
> 31: /*

Note that this change is already part of the test restructuring in:
https://github.com/openjdk/jextract/pull/17/

-------------

PR: https://git.openjdk.java.net/jextract/pull/21


More information about the jextract-dev mailing list