DynamoRIO / DynamoRIO/dynamorio

Use C11 atomics instead of hand-rolled assembly

Open
#4,264 0 comments 0 reactions 0 assignees View on GitHub
Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Another idea from @algr :

Use C11 atomics to implement our mutexes and other atomic operations, instead of using error-prone (#3956, e.g.) hand-rolled assembly.

I think it's just Windows that blocks this. We already require C++11 these days, but I didn't think Visual Studio supported many C11 features, including atomics. I just double-checked VS2017 and indeed there is no stdatomic.h. I don't have a VS2019 installation handy right now but searching online it does not look promising. Clang on Windows is a potential avenue but I believe there would be a lot of work to get there (there are many VS-specific compiler and linker flags and pragmas and other things in the DR code base that probably would need changing). Long-term that may be a good goal which would remove many of these missing language feature problems.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.