-
Notifications
You must be signed in to change notification settings - Fork 56
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
Incorrect flags update for IMULr
#524
Comments
IMULr_16_R12_RSI
IMULr
The same bug exists for |
Please be concise and to the point. There is way too much irrelevant data in this report. |
Sorry but I don't understand this bug report. |
Tentative fix in #528. |
sorry for the confusion. Before is asm state before executing the instruction and after is the result after executing that instruction. The bug here is, for that input CF and OF should true. However Jasmin has set it to false. |
My dumb fuzzer is happy with the fix. Usually it triggers the bug within couple of seconds and I don't see crashes anymore after the fix. |
This bug is found due to fuzz-test. (the bug is present in all IMULr variants, though it is easily reproducible for size 16)
In some cases, the flags CF and OF are not set properly.
I think the Jasmin semantic is wrong as it looks for overflow (I might be wrong)
Executing Instruction
IMULr_16_R12_RSI
->imulw %si, %r12w
Before:
After:
However, in the above case, Hardware sets the
CF
andOF
flags.These crashes are easily reproducible.
Edit:
removed irrelevant data
CC: @vbgl @bgregoir @cryptojedi @gbarthe
The text was updated successfully, but these errors were encountered: