<div dir="auto"><div>Can you please share hs_error file from the assertion crash with the fastdebug build? That may give us some hints.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Antoine DESSAIGNE <<a href="mailto:antoine.dessaigne@gmail.com">antoine.dessaigne@gmail.com</a>> schrieb am Fr., 15. Dez. 2023, 11:21:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
I've found an issue while migrating to OpenJDK 21. A valued local<br>
variable (effectively final) has its value removed and it throws a<br>
NullPointerException. Unfortunately, I cannot provide the source code<br>
and the data to reproduce the issue, and I couldn't create a smaller<br>
code snippet to show the issue. That said, I'll happily show the code<br>
and perform many tests during calls.<br>
<br>
Here's what I did so far to diagnose the issue.<br>
<br>
I bisected the repository to find where the regression comes from. I<br>
found this commit 3696711efa5 [1] but it's a merge so I bisected the<br>
branch and found 10737e168c9 [2]. Looking at this commit, I have no<br>
idea how it could introduce this kind of regression.<br>
<br>
Then, thanks to the guidance from Aleksey ShipilĂ«v, I tested many things<br>
* Issue does *not* happen with the following flags: -Xint,<br>
-XX:-TieredCompilation, -XX:TieredStopAtLevel=1,<br>
-XX:TieredStopAtLevel=2, -XX:TieredStopAtLevel=3<br>
* Issue also happens with fastdebug builds of OpenJDK, without<br>
crashing due to assertions<br>
* Issue still happens in the latest version of the code (commit b31454e3623)<br>
* Issue happens no matter which GC is used, I tried SerialGC,<br>
ParallelGC, G1GC, and ShenandoahGC<br>
<br>
The tests were performed in Docker containers running on 4 different hosts.<br>
<br>
Therefore it looks like C2 is generating an invalid assembly code.<br>
Unfortunately, I'm not great with assembly and the generated assembly<br>
is quite big (main code is around 20k).<br>
<br>
Do you have an idea of why this is happening? Do you know what test I<br>
can run? If one of you is available, we can schedule calls for me to<br>
show you the code and my tests. Thank you very much for your<br>
assistance.<br>
<br>
Have a nice day,<br>
<br>
Antoine DESSAIGNE<br>
<br>
[1] <a href="https://github.com/openjdk/jdk/commit/3696711efa566fb776d6923da86e17b0e1e22964" rel="noreferrer noreferrer" target="_blank">https://github.com/openjdk/jdk/commit/3696711efa566fb776d6923da86e17b0e1e22964</a><br>
[2] <a href="https://github.com/openjdk/jdk/commit/10737e168c967a08e257927251861bf2c14795ab" rel="noreferrer noreferrer" target="_blank">https://github.com/openjdk/jdk/commit/10737e168c967a08e257927251861bf2c14795ab</a><br>
</blockquote></div></div></div>