RFR: 8294460: CodeSection::alignment checks for CodeBuffer::SECT_STUBS incorrectly

Aleksey Shipilev shade at openjdk.org
Tue Sep 27 13:19:57 UTC 2022


Code added in `CodeSection::alignment` by [JDK-8287373](https://bugs.openjdk.org/browse/JDK-8287373) triggers `-Wint-in-bool-context` warning on GCC (currently globally ignored), due to apparent bug.

The bug seems innocuous now, as the branch is always taken, and the method checks for the rest of section types exhaustively. But, it would not go to `ShouldNotReachHere` if we pass e.g. `SECT_NONE` into the method.

Attention @bulasevich. 

Additional testing: 
 - [ ] Linux x86_64 fastdebug tier1

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

Commit messages:
 - Fix

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

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


More information about the hotspot-compiler-dev mailing list