summary refs log tree commit diff stats
path: root/results/scraper/box64/1661
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-16 14:55:48 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-16 14:55:48 +0200
commit63d2e9d409831aa8582787234cae4741847504b7 (patch)
tree595fae753d2eb293437226eaab2eed208463f132 /results/scraper/box64/1661
parent2843bb65aeaeb86eb89bf3d9690db61b9dc6306e (diff)
downloadqemu-analysis-63d2e9d409831aa8582787234cae4741847504b7.tar.gz
qemu-analysis-63d2e9d409831aa8582787234cae4741847504b7.zip
add box64 bug reports box64
Diffstat (limited to 'results/scraper/box64/1661')
-rw-r--r--results/scraper/box64/166145
1 files changed, 45 insertions, 0 deletions
diff --git a/results/scraper/box64/1661 b/results/scraper/box64/1661
new file mode 100644
index 000000000..e771d881a
--- /dev/null
+++ b/results/scraper/box64/1661
@@ -0,0 +1,45 @@
+Unexpected Dynarec-Interpreter Difference on `cmp` Instruction
+I tried to run python3.12 with box64 on rv64 platform (prior issue #1652 ) and used `BOX64_DYNAREC_TEST=1` to test the differences between dynarec and interpreter. I saw 4 differences about `cmp` instruction:

+

+```txt

+Warning, difference between x64 Interpreter and Dynarec in 0x3f001ea3f3 (7e 17 83 fe 63 7f 12 89)

+=======================================

+DIFF: Dynarec |  Interpreter

+----------------------

+RIP: 0000003f001ea40c | 0000003f001ea3f5

+Warning, difference between x64 Interpreter and Dynarec in 0x3f001ea36f (0f 8f bb 00 00 00 39 c3)

+=======================================

+DIFF: Dynarec |  Interpreter

+----------------------

+RIP: 0000003f001ea430 | 0000003f001ea375

+Warning, difference between x64 Interpreter and Dynarec in 0x3f001ea3f3 (7e 17 83 fe 63 7f 12 89)

+=======================================

+DIFF: Dynarec |  Interpreter

+----------------------

+RIP: 0000003f001ea40c | 0000003f001ea3f5

+Warning, difference between x64 Interpreter and Dynarec in 0x3f001ea36f (0f 8f bb 00 00 00 39 c3)

+=======================================

+DIFF: Dynarec |  Interpreter

+----------------------

+RIP: 0000003f001ea430 | 0000003f001ea375

+```

+

+The relative RIP `0x3f001ea3f3` & `0x3f001ea36f` is actually in `libpython3.12.so` and `objdump` told me:

+

+```txt

+  (( omitted ))

+  1ea369:	8b 41 3c             	mov    0x3c(%rcx),%eax

+  1ea36c:	83 f8 63             	cmp    $0x63,%eax

+  1ea36f:	0f 8f bb 00 00 00    	jg     1ea430 <PyDict_Clear@@Base+0x3d0>

+  1ea375:	39 c3                	cmp    %eax,%ebx

+  (( omitted ))

+  1ea3ed:	44 0f 4c e0          	cmovl  %eax,%r12d

+  1ea3f1:	39 f0                	cmp    %esi,%eax

+  1ea3f3:	7e 17                	jle    1ea40c <PyDict_Clear@@Base+0x3ac>

+  1ea3f5:	83 fe 63             	cmp    $0x63,%esi

+  (( omitted ))

+```

+

+I guess this might be because `cmp` did not set x64 FLAGS correctly, thus the following `jle` & `jg` did not jump to correct address. But why? I have investigated the code for about 1 day and till now can not find out the reason.

+

+I would appreciate it if anyone could help to solve this problem or give some hints about this. Thanks in advance.
\ No newline at end of file