RFR: 8372754: Add wrapper for <cstdlib> [v5]
Kim Barrett
kbarrett at openjdk.org
Mon Jan 5 19:32:13 UTC 2026
> Please review this change that adds a HotSpot wrapper for <cstdlib>. It also
> includes the forbidden function declarations for functions declared there,
> moving them from forbiddenFunctions.hpp and friends.
>
> 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 `<cstdlib>` and `<stdlib.h>` to include the wrapper instead.
> There are still a couple of includes of `<stdlib.h>` in the hotspot directory,
> because they can't use the hotspot wrapper: os/windows/include/jvm_md.h and
> share/adlc/adlc.hpp. I looked at removing the one in windows jvm_md.h, but
> there are a lot of dependencies on that implicit include in non-HotSpot code.
>
> 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:
Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- Merge branch 'master' into wrap-cstdlib
- update copyrights
- Merge branch 'master' into wrap-cstdlib
- tschatzl review
- Merge branch 'master' into wrap-cstdlib
- add wrapper for <cstdlib>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28562/files
- new: https://git.openjdk.org/jdk/pull/28562/files/ced402c0..039925ee
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28562&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28562&range=03-04
Stats: 6666 lines in 2034 files changed: 2286 ins; 922 del; 3458 mod
Patch: https://git.openjdk.org/jdk/pull/28562.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28562/head:pull/28562
PR: https://git.openjdk.org/jdk/pull/28562
More information about the hotspot-dev
mailing list