RFR: 8354969: Add strdup function for ResourceArea
Ioi Lam
iklam at openjdk.org
Fri May 9 02:25:50 UTC 2025
On Fri, 9 May 2025 00:58:46 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Do we have any immediate candidate uses for this? Whilst in the past Hotspot code had a number of utility API's, these days there is a tendency to delete any unused code. So this really needs to have an imminent usage (@iklam ?) .
>
> Code change itself looks fine. Thanks
I did this and found a few places, but there could be more
find . -name *pp | xargs grep -l strcpy | \
xargs egrep -l '(RESOURCE.*char)|(resource_allocate_bytes)' | \
xargs grep strcpy
https://github.com/openjdk/jdk/blob/9a0e6f338f34fb5da16d5f9eb710cdddd4302945/src/hotspot/share/prims/jvmtiEnvBase.cpp#L471-L472
https://github.com/openjdk/jdk/blob/9a0e6f338f34fb5da16d5f9eb710cdddd4302945/src/hotspot/share/classfile/classLoader.cpp#L1513-L1514
https://github.com/openjdk/jdk/blob/9a0e6f338f34fb5da16d5f9eb710cdddd4302945/src/hotspot/share/classfile/modules.cpp#L642-L643
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24998#issuecomment-2864904152
More information about the hotspot-dev
mailing list