On Wed, 27 Nov 2024 16:27:34 GMT, Per Minborg <pminb...@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