@mechanicker yeah, it's a good way of widening races or introducing side-effects. In my case a store was being eliminated by the compiler which thought it was dead. Put a printf() right after it and it suddenly works.
~15 years ago I identified a bug in the store-to-load forwarding logic of a prototype CPU by putting a printf() in the right place.