RFR: JDK-8326974: ODR violation in macroAssembler_aarch64.cpp [v3]

Stefan Karlsson stefank at openjdk.org
Mon Mar 11 16:32:25 UTC 2024


On Thu, 29 Feb 2024 17:16:04 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> This is a slightly different patch from the one suggested by the bug reporter. It doesn't make any sense to export those classes globally, so I've given them internal linkage.
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
> 
>   JDK-8326974: ODR violation in macroAssembler_aarch64.cpp

> Egad! the action failure messages on Windows include this:
> 
> Linking jvm.dll jvm.exp : error LNK2001: unresolved external symbol "const `anonymous namespace'::Decoder::`vftable'" (??_7Decoder@?A0xe77b3496@@6b@) jvm.exp : error LNK2001: unresolved external symbol "const `anonymous namespace'::Patcher::`vftable'" (??_7Patcher@?A0xe77b3496@@6b@)
> 
> So, clearly something in the guts of the (Windows) build does not like anonymous name spaces.

FWIW, the make files strip these symbols on Windows (for some reason). I've hit a similar problem when we started to use lambdas in hotspot:
https://github.com/openjdk/jdk/commit/09f5235c65de546640d5f923fa9369e28643c6ed

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

PR Comment: https://git.openjdk.org/jdk/pull/18056#issuecomment-1988578345


More information about the hotspot-dev mailing list