Go: Timer Race Fix and Runtime Cleanup

The runtime saw a subtle timer accounting fix for a race between Stop and Reset, alongside a compiler optimization for constant math and continued TLS test hardening. The common thread today is correctness under concurrency and edge-case testing.

Duration: PT2M23S

Episode overview

This episode is a short developer briefing from Go.

It explains recent repository work in plain language.

  • Show: Go
  • Published: 2026-08-07T13:06:56Z
  • Audio duration: PT2M23S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good morning. It's August 7th, 2026, and this is Go.

The lead story today comes out of the runtime, where a timer bug shows how tricky concurrent code can be, even in mature, heavily-used code paths.

PR 80762, from contributor h2zi, fixes a real race in the timer implementation. When a timer fires, the runtime marks a send as pending before it actually acquires the lock needed to deliver it. If the firing goroutine gets descheduled in that narrow window, both a Stop and a Reset call can sneak in. Stop correctly…

Related to that same subsystem, PR 80780 is a small but useful comment fix: the channel send documentation still described an old pointer-based wakeup mechanism that's long gone, replaced by a simple boolean block parameter. Not a functional change, but it keeps the mental model accurate for anyone debugging runtime…

On the compiler side, commit 5bec0d2 adds constant folding for several math bits operations — rotate operations, borrow subtraction, and 128-bit division. If the compiler can see the inputs are constants at compile time, it now computes the result once instead of generating runtime instructions, with codegen tests…

Finally, continued investment in TLS testing:…

Nearby episodes from Go

  1. Trimming the Fat in Hot Paths
  2. Weekly Recap - Correctness Fixes and Concurrency Cleanup
  3. Closing the Performance Gap in JSON and RISC-V
  4. Quietly Closing Security Gaps
  5. Trimming Waste in the Standard Library
  6. Fixing What Recent Changes Broke
  7. Correctness Fixes Hiding in Plain Sight
  8. Correctness Over Cleverness in the Compiler