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

Jorn Vernee jvernee at openjdk.java.net
Tue Jul 13 14:04:04 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.

`SharedUtils::convertVaListCarriers` should also be removed I think? (as well as calls to it in the linker impls)

Marked as reviewed by jvernee (Committer).

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

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


More information about the panama-dev mailing list