Integrated: 8358592: Assert in Assembler::ptest due to missing SSE42 support
Guanqiang Han
duke at openjdk.org
Wed Jul 16 05:47:47 UTC 2025
On Mon, 7 Jul 2025 02:52:10 GMT, Guanqiang Han <duke at openjdk.org> wrote:
> Setting "-XX:UseSSE=1" in command line prevents the code from entering the block shown below, which causes UseSSE42Intrinsics to not be correctly set. Because supports_sse3() return false.
> 
> in addition , setting "-XX:+UseSSE42Intrinsics" in command line set UseVectorizedMismatchIntrinsic to True shown below.
> 
> The above code causes the ptest instruction to be invoked.
> The assertion "assert(VM_Version::supports_sse4_1() || VM_Version::supports_avx(), "")" in ptest was triggered and caused the crash because of the following reason:
> Setting "-XX:UseSSE=1" in command line cause "CPU_SSE4_1" was cleared and cause "VM_Version::supports_sse4_1()" return false ,related code as below:
> 
> Setting "-XX:UseSSE=1" in command line cause "UseAVX=0" and cause "VM_Version::supports_avx()" return false ,related code as below:
> 
> all of these above cause this issue.
> i fix this issue by correcting UseSSE42Intrinsics to false when "UseSSE" in command line was set to 1, so that UseVectorizedMismatchIntrinsic will be set false and ptest was not triggered.
This pull request has now been integrated.
Changeset: e1b2229b
Author: Guanqiang Han <yongheng_hgq at 126.com>
Committer: SendaoYan <syan at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/e1b2229b0b1fe8560fcb1d6fc2cf01d69ed711ac
Stats: 79 lines in 2 files changed: 48 ins; 30 del; 1 mod
8358592: Assert in Assembler::ptest due to missing SSE42 support
Reviewed-by: kvn
-------------
PR: https://git.openjdk.org/jdk/pull/26151
More information about the hotspot-dev
mailing list