RFR: 8289046: Undefined Behaviour in x86 class Assembler [v4]
Andrew Haley
aph at openjdk.org
Tue Jul 5 08:12:24 UTC 2022
On Mon, 4 Jul 2022 10:32:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>>
>> More
>
> src/hotspot/share/code/vmreg.hpp line 90:
>
>> 88: }
>> 89: intptr_t value() const { return this - first(); }
>> 90: static VMReg Bad() { return BAD_REG+first(); }
>
> I was confused as to why is it `+first()`. We can probably do: `return as_VMReg(BAD_REG, true);`?
> I believe there are some compiler directives somewhere to silent the compiler of `nullptr` dereference, should we delete those also?
It depends on exactly what they are. I'll have a look.
-------------
PR: https://git.openjdk.org/jdk/pull/9261
More information about the hotspot-compiler-dev
mailing list