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

ASAN reports 'stack-use-after-scope' at seemingly random places after switching to clang-15 #170

Closed
itrofimow opened this issue Oct 30, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@itrofimow
Copy link
Contributor

itrofimow commented Oct 30, 2022

running benchmarks: https://pastebin.com/raw/HQickcfU
running unittests: https://pastebin.com/raw/t1D05a9M

I'm pretty certain this is ASAN wrongdoings, leaving this issue here for reference mostly

@Anton3
Copy link
Member

Anton3 commented Jan 24, 2023

This makes ASAN-testing userver unusable under clang-15, we should turn off ASAN in the false-positive function calls.

@itrofimow
Copy link
Contributor Author

The thing is there is no "false-positive function calls" - shadow memory gets poisoned somewhere before swapcontext call and gets accessed somewhere after the call, and that booms.

However disabling stack-use-after-scope detection in asan fixes this; not great not terrible.

@itrofimow
Copy link
Contributor Author

Retesting this once again with clang-15, fails reliably (although with different errors) somewhere in libbacktrace: https://pastebin.com/raw/fbVc2WkE

With this patch applied to clang-15.0.7 no errors are reported (actually asan reports about some direct leak in one allocation, but it's definitely unrelated)

@itrofimow
Copy link
Contributor Author

Seems to be fixed in clang 16.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants