RFR: 8276453: Undefined behavior in C1 LIR_OprDesc causes SEGV in fastdebug build [v5]
Man Cao
manc at openjdk.java.net
Wed Nov 10 04:15:37 UTC 2021
On Wed, 3 Nov 2021 20:01:37 GMT, Man Cao <manc at openjdk.org> wrote:
>> Hi all,
>>
>> Could anyone provide some feedback on this bug fix and refactoring change? See https://bugs.openjdk.java.net/browse/JDK-8276453 for more details.
>> If the direction of this change looks good, we can proceed removing the "UGLY HACK" in c1_LIR.hpp and refactor occurrences of "opr->fn()" to "opr.fn()".
>
> Man Cao has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix aarch64 and arm builds
In fact, the first version of this patch in Google internal JDK 11 uses the "typedef LIR_Opr LIR_OprDesc;" hack in c1_LIR.hpp, with this comment:
// UGLY HACK: add a type alias. `LIR_Opr` is not actually equivalent to the
// previous `LIR_OprDesc` (`LIR_Opr` is like more similar to previous
// `LIR_OprDesc*`). The only purpose of this typedef is so that the various
// `LIR_OprDesc::enum_value` scattered everywhere don't need to be
// modified. This should be removed, and a textual replacement of
// `LIR_OprDesc::` to `LIR_Opr::` done throughout the code.
typedef LIR_Opr LIR_OprDesc;
-------------
PR: https://git.openjdk.java.net/jdk/pull/6221
More information about the hotspot-compiler-dev
mailing list