RFR: 8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION [v4]

Kim Barrett kbarrett at openjdk.org
Wed Jan 8 04:27:37 UTC 2025


On Tue, 7 Jan 2025 15:18:47 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> Thanks! That solved the issue. Now, we need to adapt all usages in the low level AIX code and support `strdup`:

Not surprising that there are a few of these, since the aix-specific code
wasn't previously under the forbidden-function regime.

I've applied most of the provided patches. (And thanks for providing them.)
The exception is the patches related to strdup. There's only one use, in
loadlib_aix.cpp. Rather than the patch to add a permit wrapper for strdup
(affecting all other code too) and use that here, I'd rather just suppress the
warning explicitly here.

I filed an enhancement to remove the use of ::strdup.
https://bugs.openjdk.org/browse/JDK-8347157

I also filed this after looking for strdup uses in aix code.
https://bugs.openjdk.org/browse/JDK-8347143
It's about a strange use of os::strdup, so doesn't affect this PR.

> It may be possible to use some `os::` versions, but that would need a careful review. I think it's safer to keep it this way for now. @JoKern65: You may want to take a look, too.

I'll leave it to you folks to file any additional issues related to using
permit bypass functions instead of the relevant os:: functions.

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

PR Comment: https://git.openjdk.org/jdk/pull/22890#issuecomment-2576721514


More information about the graal-dev mailing list