gh-104584: Fix error handling from backedge optimization by gvanrossum · Pull Request #106484 · python/cpython
When _PyOptimizer_BackEdge returns NULL, we should restore next_instr (and stack_pointer). To accomplish this we should jump to resume_with_error instead of just error.
The problem this causes is subtle -- the only repro I have is in PR gh-106393, at commit d7df54b. But the fix is real (as shown there).
While we're at it, also improve the debug output: the offsets at which traces are identified are now measured in bytes, and always show the start offset. This makes it easier to correlate executor calls with optimizer calls, and either with dis output.