Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#6744: Use xrstors32 and xsaves32 for invariant checker test on x86-32. #6747

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

ivankyluk
Copy link
Contributor

@ivankyluk ivankyluk commented Mar 29, 2024

tool.drcachesim.invariant_checker_test fails on x86-32 with the following error:

1/371 Test #11: tool.drcachesim.invariant_checker_test ...........................***Failed 0.04 sec

Recording |Too many read records| in T1 @ ref # 16 (6 instrs since timestamp 0)
Recording |Too many read records| in T1 @ ref # 17 (6 instrs since timestamp 0)
Recording |Too many read records| in T1 @ ref # 18 (6 instrs since timestamp 0)
Recording |Too many read records| in T1 @ ref # 19 (6 instrs since timestamp 0)
Recording |Too many write records| in T1 @ ref # 21 (7 instrs since timestamp 0)
Recording |Too many write records| in T1 @ ref # 22 (7 instrs since timestamp 0)
Recording |Too many write records| in T1 @ ref # 23 (7 instrs since timestamp 0)
Recording |Too many write records| in T1 @ ref # 24 (7 instrs since timestamp 0)
Unexpected error: Too many read records at ref: 16
Unexpected error: Too many read records at ref: 17
Unexpected error: Too many read records at ref: 18
Unexpected error: Too many read records at ref: 19
Unexpected error: Too many write records at ref: 21
Unexpected error: Too many write records at ref: 22
Unexpected error: Too many write records at ref: 23
Unexpected error: Too many write records at ref: 24

OP_xsaves64 and OP_xrstors32 are marked as o64 (X86_INVALID) in core/ir/x86/decode_table.c.

instr_is_xsave() and instr_is_xrstor() return false on x86-32, hence not skipping the number of read/write record check in the invariant check on x86_32.

Use xrstors32 and xsaves32 instead for the test on x86_32.

Fixes #6744

@ivankyluk ivankyluk self-assigned this Mar 29, 2024
@ivankyluk ivankyluk changed the title i#6744: Skip xrstors64 and xsaves64 invariant checker tests on x86-32. i#6744: Use xrstors32 and xsaves32 for invariant checker check_kernel_syscall_trace test on x86-32. Mar 29, 2024
@ivankyluk ivankyluk changed the title i#6744: Use xrstors32 and xsaves32 for invariant checker check_kernel_syscall_trace test on x86-32. i#6744: Use xrstors32 and xsaves32 for invariant checker test on x86-32. Mar 29, 2024
@ivankyluk ivankyluk merged commit 086b0ce into master Mar 29, 2024
16 checks passed
@ivankyluk ivankyluk deleted the i6744-skip-xrstors64-xsaves64-tests-on-x86-32 branch March 29, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X86_32 Invariant checker test failure in check_kernel_syscall_trace: Too many read/write records
2 participants