does anyone have tips for reducing randomness in your programs while debugging? thinking of timing issues, random numbers, chaotic inputs, etc.

so far I have

- seed your RNG
- capture all input and run it a million times, and save the input once you find a version that fails
- use a record/replay debugger if you can (like rr)

Follow

@b0rk

Also: disable any helper threads that do stuff in the background (things like tcmalloc's page releaser or GC in languages with GC). They usually can be missing for the duration of a testcase with no ill effects (obviously, some bugs may be triggered by interaction with these).

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.