RFR: 8308766: TLAB initialization may cause div by zero
Thomas Schatzl
tschatzl at openjdk.org
Thu May 25 16:09:55 UTC 2023
On Thu, 25 May 2023 15:01:35 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> OK, so this does happen when a new thread comes at unfortunate time in VM lifecycle, like on shutdown? Anyway, the fix looks okay. I think many other versions are also affected, can you please add relevant Affected-Versions to the bug?
In this case, yes, a thread is attached on shutdown and you can get weird failures in other FP code (if you also enable FP exceptions, but it can leave something in a weird state apparently). I think (well I hope) it is also the cause for another similar bug (*) that caused crashes in G1 extremely intermittently (that has been closed as CNR at that point after it stopped appearing).
That assert that tripped is something that I added for trying to reproduce [JDK-8264798](https://bugs.openjdk.org/browse/JDK-8264798), initially failed to do so, and then accidentally left in when testing another change....
I think it is worth cleaning up just in case.
(*) That may just be wishful thinking...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14121#issuecomment-1563159544
More information about the hotspot-gc-dev
mailing list