-
Notifications
You must be signed in to change notification settings - Fork 225
Description
#1742 uncovered a use-after-free in sync_wait which was introduced a few months ago. A Relacy would have quickly found the bug.
How can we integrate the fledgling Relacy tests into 1) CI and/or 2) the edit/compile/test workflows for developers working on stdexec?
Concerns
Relacy is not as robust as other tools like ASAN/TSAN, since it relies on a purely library based solution of faking out names from std:: like std::mutex, std::atomic. As such, as versions of e.g. libstdc++ evolve, Relacy must be updated to allow it to continue providing its own minimal versions of <atomic> etc (example that broke with GCC-12). Relacy is far less active than projects like ASAN/TSAN, with only a handful of contributions in the past few years (many of them by me).
Currently, Relacy is known to work with stdexec + GCC 11-4 (libstdc++). It works with with Apple Clang-15, and I haven't tried newer versions. I've never tried on MSVC.
Relacy's benefits
Relacy explores adversarial memory orderings and thread interleavings, and has found previously undiscovered bugs that TSAN/ASAN could not find, with only a few iterations of Relacy's runtime scheduler (eg in async_scope, split).
Next steps
I think it should be quite feasible to update the CMake build to build on supported platforms (GCC+Clang on Linux to start, maybe Apple Clang if I can verify the latest versions work).
I'll also look to add more tests from the existing inventory of unit tests.