Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
8247678: StdLibTest fails to create an empty VaList on Windows #208
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).
@JornVernee This change now passes all automated pre-integration checks, type
Since the source branch of this PR was last updated there have been 2 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge