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

Generate weak cmpxchgs #235

Open
MattWindsor91 opened this issue Oct 24, 2020 · 1 comment
Open

Generate weak cmpxchgs #235

MattWindsor91 opened this issue Oct 24, 2020 · 1 comment
Labels
Area:Fuzzer Specifically affecting the program mutator Type:Enhancement New feature or request

Comments

@MattWindsor91
Copy link
Collaborator

The fuzzer only generates strong cmpxchgs at the moment. This is mainly because it only generates known-true cmpxchgs, and weak cmpxchgs can't be used as known-true without loops (which might not terminate?). However, if we generate known-false cmpxchgs and deadcode cmpxchgs (these two probably need separate general issues), there is no reason why we shouldn't investigate weak ones.

@MattWindsor91 MattWindsor91 added Type:Enhancement New feature or request Area:Fuzzer Specifically affecting the program mutator labels Oct 24, 2020
@MattWindsor91
Copy link
Collaborator Author

A data point for this one: LLVM's InstCombineCompares pass reduces == compares on the expected value of strong cmpxchgs to its Boolean output, but not weak cmpxchgs (because the output may not always be true when the cmpxchg succeeded). If, for some reason, optimisations like this accidentally targeted weak cmpxchgs, the result would be unsound.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Fuzzer Specifically affecting the program mutator Type:Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant