[foreign-memaccess+abi] Integrated: 8261972: CLinker.C_VA_LIST layout does not match platform layout for va_list

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Jul 13 15:33:07 UTC 2021


On Tue, 13 Jul 2021 13:34:24 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This change removes the `CLinker::VA_LIST` layout. This layout was just an alias for a pointer layout, and was not the correct layout of a `VaList` in given platform. In fact, in some platforms a `VaList` is defined as a one-array element, whereas in other platforms it is defined as a pointer. In all cases, a VaList is always passed to a function by reference, so using `C_POINTER` as a layout, and using `VaList::address` is enough to satisfy the downcall/upcall use cases. Storing valists inside struct fields is a different topic, but it's such a rare/corner/odd use case that I don't think we should distort the API because of that.

This pull request has now been integrated.

Changeset: 59281cd6
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/59281cd64b5109b6b635377c03ce1155e53765b9
Stats:     171 lines in 9 files changed: 27 ins; 105 del; 39 mod

8261972: CLinker.C_VA_LIST layout does not match platform layout for va_list

Reviewed-by: sundar, jvernee

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

PR: https://git.openjdk.java.net/panama-foreign/pull/567


More information about the panama-dev mailing list