Skip to content

Fix nullness check to src value in MOD32 and DIV32#97

Merged
qmonnet merged 2 commits intoqmonnet:mainfrom
pcy190:patch-2
Jan 5, 2024
Merged

Fix nullness check to src value in MOD32 and DIV32#97
qmonnet merged 2 commits intoqmonnet:mainfrom
pcy190:patch-2

Conversation

@pcy190
Copy link
Copy Markdown
Contributor

@pcy190 pcy190 commented Jan 3, 2024

Fixes #95
Fixes #96

Copy link
Copy Markdown
Owner

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, many thanks!

Like for the other PR, I added non-regression tests. Can you please sign-off your commit and update the PR again?

pcy190 and others added 2 commits January 5, 2024 11:42
Signed-off-by: Richard Smith <ret2happy@126.com>
We had an issue in the interpreter, because for 32-bit div and mod we
would check that the whole (64-bit long) divisor was not 0, but then
we'd only use the last 32 bits of this divisor to perform the arithmetic
operation. We fixed the bug, but let's add a non-regression test to
catch this in the future.

Link: qmonnet#95
Link: qmonnet#96
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Richard Smith <ret2happy@126.com>
@pcy190
Copy link
Copy Markdown
Contributor Author

pcy190 commented Jan 5, 2024

Updated the patch.

@qmonnet qmonnet merged commit 9bd61f2 into qmonnet:main Jan 5, 2024
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.

Attempt to divide by zero in DIV32 of interpreter Attempt to calculate the remainder with a divisor of zero for MOD32 in interpreter

2 participants