One 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 even possible without emulation?
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 even possible without emulation?