Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vitalybuka
Copy link
Contributor

@vitalybuka vitalybuka commented Jan 30, 2025

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

Adding to NULL is undefined behavior.

Examples of reports are in DynamoRIO#7229.

Many others are likely still undiscovered.

Issue: DynamoRIO#7229
@edeiana edeiana self-requested a review January 30, 2025 19:29
Copy link
Contributor

@edeiana edeiana left a 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)));
Copy link
Contributor

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).

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.

2 participants