RFR: 8276453: Undefined behavior in C1 LIR_OprDesc causes SEGV in fastdebug build [v5]
Dean Long
dlong at openjdk.java.net
Wed Nov 10 06:17:39 UTC 2021
On Wed, 10 Nov 2021 04:04:59 GMT, Man Cao <manc at openjdk.org> wrote:
> That could work. Do you think it is better to split this into two or three RFEs:
I would be in favor of that, if it's ok with @vnkozlov
> Do you think it is feasible to replace all the NULL and 0 with LIR_Opr::illegalOpr()?
I don't think so, if we want to preserve existing behavior. NULL and illegalOpr() were two different values before,
and now LIR_Opr() introduces a new value that is different from both NULL and illegalOpr(), and with the value 0 I believe it becomes a valid pointer LIR_Opt. To preserve exisiting behavior, we should crash if any attempt is made to use a NULL LIR_Opr. illegalOpr() doesn't do that. We could change existing behavior rather than preserve it, but then each use of NULL would need to be examined on a case-by-case basis.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6221
More information about the hotspot-compiler-dev
mailing list