On Mon, 3 May 2021 15:37:44 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/aarch64/macos/StackVaList.java >> line 131: >> >>> 129: MemorySegment struct = allocator.allocate(layout); >>> 130: struct.copyFrom(segment.asSlice(0L, >>> layout.byteSize())); >>> 131: segment = segment.asSlice(VA_SLOT_SIZE_BYTES); >> >> Since arguments are packed according to alignment, I guess the offset could >> be larger or smaller than 8 bytes as well? > > This is using `alignUp(arg.layout.byteSize(), VA_SLOT_SIZE_BYTES)` in the > writing code, so I think it should be the same here? Yes this is a mistake (`skip()` has the same problem). I'll add an extra case to VaListTest to catch it. ------------- PR: https://git.openjdk.java.net/jdk/pull/3617