8372754: Add wrapper for <cstdlib>
Please review this change that adds a HotSpot wrapper for
The AIX-specific workaround for its macro-based renaming of malloc/calloc is also moved to this wrapper, so there is a single location for it. Also cleaned it up a bit, based on further investigation of the problem.
Also changed uses of
While updating to use the wrapper, I also did a small amount of include cleanup here and there. The changes around immediate_aarch64.hpp are perhaps a little less trivial than I should have made here.
Testing: mach5 tier1
This should probably be retested by aix port maintainer folks, although I don't think I made any relevant changes since you last tested it.
This change also resolves: /issue JDK-8369205
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issues
- JDK-8372754: Add wrapper for <cstdlib> (Enhancement - P4)
- JDK-8369205: AIX build break in forbiddenFunctions.hpp (Bug - P2)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28562/head:pull/28562
$ git checkout pull/28562
Update a local copy of the PR:
$ git checkout pull/28562
$ git pull https://git.openjdk.org/jdk.git pull/28562/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28562
View PR using the GUI difftool:
$ git pr show -t 28562
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28562.diff
Using Webrev
:wave: Welcome back kbarrett! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@kimbarrett This change is no longer ready for integration - check the PR body for details.
@kimbarrett The following label will be automatically applied to this pull request:
-
hotspot
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.
Are we using wrappers for C Standard Library headers as well now?
@kimbarrett I've successfully built Temurin on our AIX 7.2 ndoe with this patch, many thanks https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk/job/jdk-aix-ppc64-temurin/457/console
@kimbarrett
Adding additional issue to issue list: 8369205: AIX build break in forbiddenFunctions.hpp.
Are we using wrappers for C Standard Library headers as well now?
For those with corresponding C++ headers, yes. Those .h files were deprecated forever, but then in some more recent C++ Standard they were undeprecated but described as being intented for use only in code that was intended to be valid as both C and C++.
I'm thinking we might want to introduce wrappers for at least some other C library headers, again as a shared place HotSpot-specific tailoring. But that's something for (possibly much) later. First working through the C++ Standard Library headers.