RFR: 8344989: Test java/foreign/TestLinker.java failed with zero: IllegalStateException: libffi call failed with status: FFI_BAD_TYPEDEF

Jorn Vernee jvernee at openjdk.org
Thu Nov 28 12:08:40 UTC 2024


On Wed, 27 Nov 2024 16:27:34 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes to check for empty layouts in the fallback linker and then prevent them from being forwarded.
> 
> Passes tier5 linker tests.

Marked as reviewed by jvernee (Reviewer).

test/jdk/java/foreign/TestLinker.java line 254:

> 252:         var struct8a8 = MemoryLayout.structLayout(sequence0a8, sequence3a1, padding5a1);
> 253:         var fd = FunctionDescriptor.of(struct8a8, struct8a8, struct8a8);
> 254:         if (linker.getClass().equals(FallbackLinker.class)) {

Alternatively, we could move this test case to a separate file (perhaps with other test cases that test empty aggregates), and then exclude it for the fallback linker using `@requires jdk.foreign.linker != "FALLBACK"`.

I don't mind this approach though.

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

PR Review: https://git.openjdk.org/jdk/pull/22417#pullrequestreview-2467939114
PR Review Comment: https://git.openjdk.org/jdk/pull/22417#discussion_r1862058562


More information about the core-libs-dev mailing list