RFR: 8358957: [ubsan]: The assert in layout_helper_boolean_diffbit() in klass.hpp needs UB to fail

Afshin Zafari azafari at openjdk.org
Mon Sep 15 09:15:49 UTC 2025


Avoid using loop and UB in left-shift operation as suggested by Kim's comment in the JBS-issue.

Tests:
 mach5 tiers 1-5 {macosx-aarch64, linux-x64, windows-x64} x {debug, product}

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

Commit messages:
 - 8358957: [ubsan]: The assert in layout_helper_boolean_diffbit() in klass.hpp needs UB to fail

Changes: https://git.openjdk.org/jdk/pull/27288/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27288&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358957
  Stats: 10 lines in 1 file changed: 1 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/27288.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27288/head:pull/27288

PR: https://git.openjdk.org/jdk/pull/27288


More information about the hotspot-dev mailing list