Here is a standalone reproducer. It doesn't crash in the same way, but it does crash with tip. With 1.11 it succeeds. The bug is that main.(*DouglasPeuckerSimplifier).LineString calls runtime.racefuncexit but never calls runtime.racefuncenter. That method inlines a couple of functions, so this may be a bug in mid-stack inlining.