Skip to content

Handle scudo rename and changes for rebranch #68063

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 3 commits into from
Aug 24, 2023

Conversation

etcwilde
Copy link
Member

@etcwilde etcwilde commented Aug 22, 2023

This patch set updates the old driver to handle changes to the scudo sanitizer in upstream LLVM.
The sanitizer is now standalone and shouldn't be used with other sanitizers. In this change, the library was renamed to scudo_standalone to reflect the change. As such, the driver maps the scudo sanitizer to the appropriate filename.

I've also included the updated logic in the driver to ensure that scudo is the only sanitizer passed to the driver, and to otherwise emit a diagnostic.

CC @Lukasa

rdar://114209408

@etcwilde etcwilde requested a review from artemcm August 22, 2023 16:32
@etcwilde
Copy link
Member Author

@swift-ci please test Linux

@etcwilde
Copy link
Member Author

Manually testing the error reporting with -sanitizer='address,scudo,thread' returns

<unknown>:0: error: argument '-sanitize=address' is not allowed with '-sanitize=thread'
<unknown>:0: error: argument '-sanitize=scudo' is not allowed with '-sanitize=address'
<unknown>:0: error: argument '-sanitize=scudo' is not allowed with '-sanitize=thread'

@etcwilde
Copy link
Member Author

Linux failure

AttributeError: module 'lit.util' has no attribute 'abs_path_preserve_drive'

Should be fixed by swiftlang/llvm-project#7298

@etcwilde
Copy link
Member Author

@swift-ci please smoke test Linux

@etcwilde
Copy link
Member Author

Scudo is now failing silently. I'll have to take a closer look tomorrow on my linux box.

@etcwilde
Copy link
Member Author

Issue was that not handles crashes differently than non-zero return codes. Passing --crash should fix it.

@etcwilde
Copy link
Member Author

@swift-ci please smoke test Linux

Lukasa and others added 3 commits August 23, 2023 15:36
The scudo runtime was renamed to indicate that it now must run
standalone from other sanitizers. This patch updates the driver to
search for the appropriate filename.

LLVM rename: https://reviews.llvm.org/D138157
Scudo is now a standalone sanitizer that must be used in isolation.
Fixing the driver logic to identify and diagnose when it is used with
any other sanitizer.
Scudo crashes when it trips. Pass the `--crash` flag to `not` to handle
it properly.
@etcwilde etcwilde force-pushed the ewilde/scudo-rename branch from 06c3c98 to bf4dadc Compare August 23, 2023 22:36
@etcwilde
Copy link
Member Author

@swift-ci please smoke test Linux

@etcwilde
Copy link
Member Author

Driver flag testing wasn't accounting for the fact that scudo has to be run alone now. Fixed that test.

@etcwilde
Copy link
Member Author

Okay, scudo tests are passing.

@etcwilde etcwilde merged commit 65f1ecd into swiftlang:rebranch Aug 24, 2023
@etcwilde etcwilde deleted the ewilde/scudo-rename branch August 24, 2023 18:16
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