RFR: 8327049: Only export debug.cpp functions on Windows [v2]

Magnus Ihse Bursie ihse at openjdk.org
Fri Mar 1 15:08:43 UTC 2024


On Fri, 1 Mar 2024 14:17:08 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> Can you say what these are? Could not find any info about that in any related JBS or GitHub places.

We spotted a problem with an Oracle-internal testing tool that exported a function named `debug`, which ended up calling the exported `debug` function from Hotspot instead. But the problem could theoretically apply to any code out there that links with libjvm.so and has conflicting symbols defined. Normally, the symbols exported from Hotspot are named `JVM_<foo>` to minimize the risk of this theoretical conflict becoming real, but the functions in debug.cpp has much shorter and more common names (for simple usage in the debugger), so the risk of actual conflicts are much higher.

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

PR Comment: https://git.openjdk.org/jdk/pull/18062#issuecomment-1973351820


More information about the hotspot-dev mailing list