RFR: 8284883: JVM crash: guarantee(sect->end() <= sect->limit()) failed: sanity on AVX512 [v2]
Jatin Bhateja
jbhateja at openjdk.java.net
Fri Apr 29 06:21:43 UTC 2022
On Thu, 28 Apr 2022 21:50:30 GMT, Dean Long <dlong at openjdk.org> wrote:
>> 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.
>
> @vnkozlov OK, good suggestion. Let me try that.
Hi @dean-long ,
We already have a loop to perform system initialization if is_large flag is set over ClearArray.
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/memnode.cpp#L3091
Code bloating will occur if user sets InitArrayShortSize to a very large value, earlier we were emitting 8 bytes store which was later improved to use vector instructions. Your fix to emit a loop for large constant sized initialization will make this flow full proof.
Best Regards,
Jatin
-------------
PR: https://git.openjdk.java.net/jdk/pull/8457
More information about the hotspot-compiler-dev
mailing list