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

Break cmpxchg orders in dead code #234

Open
MattWindsor91 opened this issue Oct 24, 2020 · 0 comments
Open

Break cmpxchg orders in dead code #234

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

Comments

@MattWindsor91
Copy link
Collaborator

MattWindsor91 commented Oct 24, 2020

Quoth the C11 standard on atomic_compare_exchange_X_explicit: 'The failure argument shall be no stronger than the success argument.' Knowing this, the fuzzer never generates memory orders that fail this requirement. However, we've found on at least one occasion that we can find fun compiler bugs by making the compiler compile unreachable code that may exhibit UB, so it seems like a good idea to loosen this requirement when building cmpxchg in dead code.

NB: I'm assuming that no compiler errors out when given code like this (Clang certainly doesn't).

@MattWindsor91 MattWindsor91 added Type:Enhancement New feature or request Area:Fuzzer Specifically affecting the program mutator labels Oct 24, 2020
@MattWindsor91 MattWindsor91 added the Compiler:LLVM Specifically affecting LLVM label Oct 28, 2020
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 Compiler:LLVM Specifically affecting LLVM Type:Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant