I made a mistake when I implemented this workaround:
6e299b2e23/projects/ruby/fuzz_ruby_gems.c (L288-L291)
To ensure that the workaround code won't get dead-code-eliminated by a
clever compiler optimization, I decided to feed bytes from the test data
in as an argument:
6e299b2e23/projects/ruby/fuzz_ruby_gems.c (L404-L406)
But that code only gets run on the first iteration (it's protected by a
static variable). That means that the code behaves differently when
you're trying to reproduce a testcase. This PR fixes the bug by
rewinding the bytestream back to the beginning after it's been used for
the workaround code.