summary refs log tree commit diff stats
path: root/results/classifier/semantic-bugs/instruction/1828867
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-12 09:56:59 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-06-12 09:56:59 +0200
commitb89a938452613061c0f1f23e710281cf5c83cb29 (patch)
treed5faecfd167e088848cad894f8dc9cfef3352e3b /results/classifier/semantic-bugs/instruction/1828867
parent7b681b9f9eedaad2f081ae11a32f459f5a1312ff (diff)
downloadqemu-analysis-b89a938452613061c0f1f23e710281cf5c83cb29.tar.gz
qemu-analysis-b89a938452613061c0f1f23e710281cf5c83cb29.zip
add manually reviewed semantic bugs
Diffstat (limited to 'results/classifier/semantic-bugs/instruction/1828867')
-rw-r--r--results/classifier/semantic-bugs/instruction/182886748
1 files changed, 48 insertions, 0 deletions
diff --git a/results/classifier/semantic-bugs/instruction/1828867 b/results/classifier/semantic-bugs/instruction/1828867
new file mode 100644
index 000000000..05260e5d1
--- /dev/null
+++ b/results/classifier/semantic-bugs/instruction/1828867
@@ -0,0 +1,48 @@
+instruction: 0.527
+device: 0.454
+socket: 0.435
+mistranslation: 0.388
+assembly: 0.285
+network: 0.264
+vnc: 0.258
+graphic: 0.231
+semantic: 0.225
+boot: 0.171
+other: 0.169
+KVM: 0.124
+
+QEmu translation is incorrect when using REX in combination with LAHF/SAHF
+
+When translating code that is using LAHF and SAHF in combination with the REX prefix then qemu translates incorrectly.
+These two instructions only ever use the AH register. Contrary to other instructions where if you use REX + high bit offsets then it'll pull in rsp and a few other registers.
+On hardware the REX prefix doesn't effect behaviour of these instructions at all.
+QEMU incorrectly selects RSP as the register of choice here due to this combination of REX + AH register usage.
+
+I've attached a patch that is super terrible just so I can work around the issue locally and to sort of show off how it is to be "fixed"
+
+
+
+Here's also a basic test that can be run on hardware and have rflags and rsp inspected after each instruction just to see how hardware doesn't effect it.
+
+The QEMU project is currently considering to move its bug tracking to
+another system. For this we need to know which bugs are still valid
+and which could be closed already. Thus we are setting older bugs to
+"Incomplete" now.
+
+If you still think this bug report here is valid, then please switch
+the state back to "New" within the next 60 days, otherwise this report
+will be marked as "Expired". Or please mark it as "Fix Released" if
+the problem has been solved with a newer version of QEMU already.
+
+Thank you and sorry for the inconvenience.
+
+This is still relevant.
+
+
+This is an automated cleanup. This bug report has been moved to QEMU's
+new bug tracker on gitlab.com and thus gets marked as 'expired' now.
+Please continue with the discussion here:
+
+ https://gitlab.com/qemu-project/qemu/-/issues/130
+
+