<div dir="ltr"><div>The error is stable and can be reproduced by simply building the project. But it seems to be an issue with javac indeed. The tableswitch statement is compiled as follows.</div><div><br></div><div>       213: tableswitch   { // 100 to 116<br>                     100: 322<br>                     101: 296<br>                     102: 361<br>                     103: 335<br>                     104: 348<br>                     105: 309<br>                     106: 374<br>                     107: 374<br>                     108: 374<br>                     109: 374<br>                     110: 374<br>                     111: 374<br>                     112: 374<br>                     113: 374<br>                     114: 374<br>                     115: 374<br>                     116: 374<br>                 default: 374</div><div><br></div><div>The right branch for 'p' is included at offset 361, but 'p' is an integer value of 109. The character 102 (f) is not included in the Java source.</div><div><br></div><div>I guess this is the wrong mailing list in this case. I will post this to the javac list.</div><div><br></div><div>Thanks, Rafael</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 21. März 2025 um 10:54 Uhr schrieb Remi Forax <<a href="mailto:forax@univ-mlv.fr" target="_blank">forax@univ-mlv.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div>Hello Raphael,</div><div>It may be hard to reproduce,</div><div>can you do a javap -c on the class/method so it will be easier to see if the generated bytecode is wrong of if it's a VM issue.</div><div><br></div><div>regards,</div><div>Rémi</div><div><br></div><hr id="m_3686300147316054987m_649006921082298200zwchr"><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Rafael Winterhalter" <<a href="mailto:rafael.wth@gmail.com" target="_blank">rafael.wth@gmail.com</a>><br><b>To: </b>"compiler-dev" <<a href="mailto:compiler-dev@openjdk.org" target="_blank">compiler-dev@openjdk.org</a>><br><b>Sent: </b>Friday, March 21, 2025 10:20:48 AM<br><b>Subject: </b>Bug in JDK25 with switch statements<br></blockquote></div><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div>Hello,</div><div>my project Byte Buddy fails to build with recent JDK 25s. I am not sure if this is a known bug, but I wanted to mention it: <a href="https://github.com/raphw/byte-buddy/actions/runs/13975513319/job/39131008617" target="_blank">https://github.com/raphw/byte-buddy/actions/runs/13975513319/job/39131008617</a><br></div><br><div>The reason for the build failure is that this switch statement ends up in the default branch: <a href="https://github.com/raphw/byte-buddy/blob/master/byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java#L3239" target="_blank">https://github.com/raphw/byte-buddy/blob/master/byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java#L3239</a><br></div><br><div>This is happening for the char 'p' which is the last legal branch of the switch. This does not yield an error on JDKs 5 to 24, so this must be introduced recently.</div><br><div>Thanks, Rafael</div></div><br></blockquote></div></div></div></blockquote></div>