RFR: 8145096: Undefined behaviour in HotSpot
John Rose
john.r.rose at oracle.com
Fri Dec 18 04:38:45 UTC 2015
On Dec 17, 2015, at 2:31 AM, Andrew Haley <aph at redhat.com> wrote:
>
> I'm sure that it makes no sense ever to construct bitmasks using a
> signed type. I am doing my best to be certain that I don't break
> anything. I'll have a look to see if there is some way that I can
> change this to unsigned without changing behaviour.
This is more reason to avoid using the built-in C operators for bit-twiddling
and use macros or inlines instead. See globalDefinitions.hpp, near right_n_bits.
(Which is wrong, but less wrong than writing built-in C operators.)
— John
More information about the hotspot-dev
mailing list