RFR: 8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed()

David Holmes dholmes at openjdk.org
Sun Dec 22 20:39:41 UTC 2024


On Sun, 22 Dec 2024 20:33:34 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Both expressions: the one in the patch and the suggested expression for overflow test require study and neither are faster to understand. Both require comment so it's really a preference of which math expression you like the best. Either is fine to me because they both look correct to me and with a comment I don't have to reexamine them.
>> 
>> As for the minimal fix, the suggested patch does two things that are related and both desirable to have as a fix.  Moving the ceiling calculation to only be adjusted if the monitors used are above MonitorDeflationThreshold, and fixing the overflow resolve both causes of the bug.   I think we want both of these. The less minimal patch of determining how to adjust the ceiling and what to adjust it to, with what values and potentially removing some of the command line arguments should be longer term work.
>
> The transformation using delta is the idiomatic way to convert potentially overflowing (and possibly UB) expressions into a conditional operation that avoids overflow. As Coleen states neither form is generally obvious to all readers.

I'd prefer to see any change to when/why the ceiling is adjusted deferred to the issue that looks at what it should be adjusted to. Nothing about this ceiling is intuitive or obvious to me.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22815#discussion_r1895050519


More information about the hotspot-runtime-dev mailing list