RFR: 8347143: [aix] Fix strdup use in os::dll_load

Martin Doerr mdoerr at openjdk.org
Mon Jan 13 16:39:42 UTC 2025


On Mon, 13 Jan 2025 15:21:43 GMT, Joachim Kern <jkern at openjdk.org> wrote:

> The use of strdup (which is os::strdup because of context) in aix's os::dll_load is odd. The result is nearly unused (it's passed to strrchr, but the original filename could be used instead), so the duplication doesn't seem needed. And the duplicate is free'd using FREE_C_HEAP_ARRAY, which seems wrong.

I think there was no bug, but the new code is clearly better. @kimbarrett: Do you agree?

Please update the Copyright header!

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

Marked as reviewed by mdoerr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23078#pullrequestreview-2547193711
PR Comment: https://git.openjdk.org/jdk/pull/23078#issuecomment-2587618701


More information about the hotspot-runtime-dev mailing list