RFR: 8284883: JVM crash: guarantee(sect->end() <= sect->limit()) failed: sanity on AVX512
Vladimir Kozlov
kvn at openjdk.java.net
Thu Apr 28 20:37:43 UTC 2022
On Thu, 28 Apr 2022 19:42:05 GMT, Dean Long <dlong at openjdk.org> wrote:
> This fix prevents overflowing the C2 scratch buffer for large ClearArray operations. I also noticed that when IdealizeClearArrayNode is turned off, the "is_large" flag on the ClearArray node was not set correctly, so I fixed that too.
>
> I could use some help testing the x86_32 change.
I think we should fix code in `MacroAssembler::clear_mem()` to generate loop code (4 in loop and remaining after it) instead of line of instructions if more then 8 64-bytes move instructions are generated.
Even with 256 value, you suggested, there will be 32 instructions. Originally it was assumed that `!is_large()` will be true for arrays with < InitArrayShortSize (64) so you will have only 8 instructions. But, as you said, InitArrayShortSize could be set to ridiculous value.
Also forcing use Mach instruction with value loaded into register may affect spilling in surrounding code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8457
More information about the hotspot-compiler-dev
mailing list