RFR: JDK-8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
Thomas Stuefe
stuefe at openjdk.org
Thu Jun 30 04:34:39 UTC 2022
On Thu, 30 Jun 2022 01:57:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
> This seems to rely on the compiler not recognising that the single use of the new function could be inlined into the original.
No. Using free() (without global scope "::") inside os::Linux:: will resolve the the nearest outer scope os::free(). Using free() inside a global function will not do that since free() is already in global scope, so gets resolved to ::free(). This is not dependent on any inlining decisions.
-------------
PR: https://git.openjdk.org/jdk/pull/9328
More information about the hotspot-runtime-dev
mailing list