RFR: JDK-8294902: Undefined Behavior in C2 regalloc with null references
Vladimir Kozlov
kvn at openjdk.org
Tue Nov 1 17:46:43 UTC 2022
On Mon, 31 Oct 2022 14:40:32 GMT, Andrew Haley <aph at openjdk.org> wrote:
> This patch fixes the remaining null pointer dereference bugs that I know of.
>
> For the main bug, C2 was using a null reference to indicate an uninitialized `Node_List`. I replaced the null reference with a static sentinel.
>
> I also turned on `-fsanitize=null` and found and fixed a bunch of other null pointer dereferences. With this,I have run a full bootstrap and tier1 tests with `-fsanitize=null` enabled.
>
> I have checked that the code generated by GCC is not worse in any significant way, so I don't expect to see any performance regressions.
>
> I'd like to enable `-fsanitize=null` in debug builds to prevent regressions in this area. What do you think?
Changes are good.
Can you tell more about `-fsanitize=null` effect on libjvm size and performance of fastdebug build we use in testing? If it is only few percents I am for enabling it in debug build.
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10920
More information about the hotspot-dev
mailing list