Properly testing concurrent data structures
31–33 of 33 posts
Re: Properly testing concurrent data structures
#32One downside of this approach is that the tested code itself has to be modified to accomodate the testing code. I think the same could be achieved by launching two threads and single stepping them with ptrace to "randomly" interleave the execution of their instructions. Something like rr's chaos mode. Some instructions may not be atomic though, so we would need a way to single step on "atomic microcodes" if that's ev…
Re: Properly testing concurrent data structures
#33This is great, is there a "loom" like library for C++? I have a set of lock-free data structures that I would like to test.
Yes, the (IMHO) the easiest one to use is the Relacy Race Detector ( https://github.com/dvyukov/relacy and https://www.1024cores.net/home/relacy-race-detector ) It's been around a while and is easy to work with. Written by Dmitry Vyukov, an expert in the concurrency world.