-
Notifications
You must be signed in to change notification settings - Fork 573
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#7229: Fix --fsanitize=pointer-overflow reports #7234
base: master
Are you sure you want to change the base?
Conversation
Adding to NULL is undefined behavior. Examples of reports are in DynamoRIO#7229. Many others are likely still undiscovered. Issue: DynamoRIO#7229
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for contributing!
Please make sure all Github tests pass.
@@ -3710,7 +3710,7 @@ sandbox_top_of_bb(dcontext_t *dcontext, instrlist_t *ilist, bool s2ro, uint flag | |||
#endif | |||
PRE(ilist, instr, | |||
INSTR_CREATE_mov_imm(dcontext, opnd_create_reg(REG_XCX), | |||
OPND_CREATE_INTPTR(end_pc - (start_pc + 1)))); | |||
OPND_CREATE_INTPTR(end_pc - start_pc + 1))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be end_pc - start_pc - 1
.
It's also the cause for (at least some) Github CI tests failing/timing-out (e.g., security-common.selfmod2
).
Adding to NULL is undefined behavior.
Examples of reports are in #7229.
Many others are likely still undiscovered.
Some reports are here #7229 (comment)
Issue: #7229