[foreign-abi] [Rev 02] RFR: 8247678: StdLibTest fails to create an empty VaList on Windows

Jorn Vernee jvernee at openjdk.java.net
Tue Jun 16 22:44:22 UTC 2020


> Hi,
> 
> This patch addresses a test failure in StdLibTest, caused by trying to allocate an empty VaList in the Windows
> implementation.
> (After some discussion with Maurizio) this is fixed by special casing empty va lists in the implementation.
> VaList.Builder.build() now returns a special empty va list constant when the VaList is empty. There's also an added
> VaList.empty() method, to directly create an empty VaList.  To implement this I removed the getSegment methods in the
> VaList implementation classes, and instead rely on VaList::address for unboxing a VaList. This works better with the
> spacial case empty VaList. Along with that I moved some of the shared code for handling VaList in the linkers to
> SharedUtils.  I added tests for the empty() API to verify that the returned VaList is non-closeable, and also updated
> StdLibTest to close the VaLists it creates (it wasn't doing this yet).  Thanks,
> Jorn

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  Remove unnecessary restrickted segment from SysV implementation.

This pull request has now been integrated.

Changeset: 2ed13bf9
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/2ed13bf9
Stats:     281 lines in 9 files changed: 73 ins; 182 del; 26 mod

8247678: StdLibTest fails to create an empty VaList on Windows

Reviewed-by: mcimadamore

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/208/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/208/files/eb80703c..d0b08a46

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/208/webrev.02
 - incr: https://webrevs.openjdk.java.net/panama-foreign/208/webrev.01-02

  Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/208.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/208/head:pull/208

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


More information about the panama-dev mailing list