Skip to content

[cherry-pick stable/20230725][Sanitizers] Don't inline unpoisoning of small stacks when inlining d… #7894

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

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

wrotki
Copy link

@wrotki wrotki commented Dec 16, 2023

…isabled (llvm#75555)

When ASan.MaxInlinePoisoningSize == 0 , it means that no shadow memory operations should be made via inlined instrumentation code, but only via calls to shadow setting functions. This change fixes one violation of this, which happened when the function allocas count was small, i.e. less than 5 - in the code modifying the shadow just before ret instruction.
We now explicitly check ASan.MaxInlinePoisoningSize , and if it's 0 then we disallow inlining. It is required for the instrumentation emitting code suitable for handling by ABI implementation.

rdar://119513720

Co-authored-by: Mariusz Borsa [email protected]
(cherry picked from commit 7e4ae28)

…isabled (llvm#75555)

When ASan.MaxInlinePoisoningSize == 0 , it means that no shadow memory
operations should be made via inlined instrumentation code,
but only via calls to shadow setting functions. This change fixes one
violation of this, which happened when the function allocas count
was small, i.e. less than 5 - in the code modifying the shadow just
before ret instruction.
We now explicitly check ASan.MaxInlinePoisoningSize , and if it's 0 then
we disallow inlining. It is required for the instrumentation
emitting code suitable for handling by ABI implementation.

rdar://119513720

Co-authored-by: Mariusz Borsa <[email protected]>
(cherry picked from commit 7e4ae28)
@wrotki
Copy link
Author

wrotki commented Dec 16, 2023

@swift-ci Please test

@wrotki wrotki merged commit 067380b into stable/20230725 Dec 17, 2023
@wrotki wrotki deleted the m_borsa/cherry-pick-7e4ae286 branch December 17, 2023 01:39
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.

1 participant