[lworld] RFR: 8356963: [lworld] MemNode::optimize_simple_memory_chain fails with "sanity check for basic cases" [v2]

Quan Anh Mai qamai at openjdk.org
Sun May 18 08:35:03 UTC 2025


On Fri, 16 May 2025 13:02:53 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   include
>
> I also noticed that `try_optimize_strict_final_load_memory` has a `field` argument that is unused.

@TobiHartmann The failures in Windows are due to a bug in `SigEntry::compare`. We try to obtain an `int` from `e1->_sort_offset - e2->_sort_offset` and the rounding error makes it that the null marker is equal to the last field. `std::qsort` is not stable, so we pass on Linux because it seems `std::qsort` is stable there. If I add a shuffle before sorting the array of `SigEntry`, a similar failure can be observed on Linux. The issue has been fixed.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1456#issuecomment-2888856178


More information about the valhalla-dev mailing list