In layout_helper_boolean_diffbit(), inside the loop that is calculating the result, there is an assert that diffbit (the in-progress calculated result) is not zero. But it can never be zero in the absence of UB. It is initialized to 1, and then left shifted 1 for each iteration. That bit could be shifted all the way to the sign bit, so that the value is INT_MIN. But another left shift, which naively would result in zero, is actually UB.
- relates to
-
JDK-8314258 checked_cast doesn't properly check some cases
-
- Open
-
- links to
-
Review(master)
openjdk/jdk/27288