On Tue, 16 Jun 2026 23:20:46 GMT, Ashay Rane <[email protected]> wrote:

> The assertion in src/hotspot/share/code/aotCodeCache.cpp requires that
> all functions are mapped to distinct addresses, but this assumption
> breaks when we enable the Identical COMDAT Folding optimization in MSVC.
> Indeed, the MSVC documentation points to this exact issue being a
> potential problem:
> 
>> Because /OPT:ICF can cause the same address to be assigned to
>> different functions or read-only data members (that is, const
>> variables when compiled by using /Gy), it can break a program that
>> depends on unique addresses for functions or read-only data members.
> 
> To avoid future problems with AOT failing because of ICF, this patch
> disables ICF when compiling the JVM.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Marked as reviewed by erikj (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/31544#pullrequestreview-4512659383

Reply via email to