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
Add druntime support for AddressSanitizer stack-use-after-return, fakestack #3888
Conversation
da55bdd
to
7b80705
Compare
The problem is that this change (as well as the previous ASan support addition to druntime) creates an ABI incompatibility between druntime with/without version SupportSanitizers: it adds variables to structs/classes that are exposed to the userand that are allocated by user code. I see two options to solve this:
I prefer option 2. With extra effort, I think I can reduce the amount of storage needed (e.g. don't store fakestack in each StackContext.) |
Are they in the druntime lib only, not instantiated? I.e., would user code not have to be compiled with If that's the case, then maybe druntime could use 2 internal versions - |
Remaining error on Cirrus CI / Ubuntu 18.04 x64 multilib rtSanitizers:
This is surprising. Somehow there is debug line information for the first check on Thanks! |
Hmm, I don't recall seeing such a mixture of available/missing line infos for unoptimized code OTOH, but yeah, ignoring the line sounds good enough. |
LGTM after a superficial glance without checking the actual logic/tests. Please merge yourself if happy. [Next time, please use |
[If you want to add a release note entry, please extend the new master section of |
… it, which changes the ABI (adds data structure fields) for LDC. Actual execution of code to support sanitizers (e.g. keeping track of ASan data and scanning the ASan FakeStack) is disabled by default and requires building
Some CI systems have only partial line data (reason unknown).
See https://github.com/google/sanitizers/wiki/AddressSanitizerExampleUseAfterReturn for an explanation of what bugs can be caught with ASan's fakestack enabled.
Apologies for the mess in git on master :(