RFR: 8358592: Assert in Assembler::ptest due to missing SSE42 support [v5]
Guanqiang Han
duke at openjdk.org
Mon Jul 14 13:35:02 UTC 2025
> 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.
Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
- Update full name
- Merge remote-tracking branch 'upstream/master' into 8358592
- update regression test
- Update Test8358592.java
run on x86_64
- add regression test for JDK-8358592
- Merge remote-tracking branch 'upstream/master' into 8358592
- 8358592: Assert in Assembler::ptest due to missing SSE42 support
Setting "-XX:UseSSE=1" in command line prevents the code from entering the block which causes UseSSE42Intrinsics to not be correctly set.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26151/files
- new: https://git.openjdk.org/jdk/pull/26151/files/206e477a..563b4f7a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26151&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26151&range=03-04
Stats: 10054 lines in 299 files changed: 5581 ins; 1627 del; 2846 mod
Patch: https://git.openjdk.org/jdk/pull/26151.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26151/head:pull/26151
PR: https://git.openjdk.org/jdk/pull/26151
More information about the hotspot-dev
mailing list