The Wire · Showcase
GO RUNTIME PATCHES ARM MISCOMPILATION, FIXES USERINFO VALIDATION IN CORS
By RepoJournal · Filed · About Go
The Go compiler just shipped critical fixes for ARM64 integer overflow handling and net/http now properly validates origin URLs, while pkgsite quietly ships Vertex AI embeddings infrastructure.
ARM64 and ARM both had a dangerous miscompilation bug in the noov (no-overflow) comparison logic [1]. When the compiler folded comparisons like `a-x*y < 0` into flag-based operations and then absorbed those flags via InvertFlags canonicalization, it swapped comparison directions. This works fine for normal integers but breaks catastrophically at minimum int values. The fix prevents that absorption. Meanwhile, net/http's CrossOriginProtection now properly rejects origins containing userinfo parts [2], closing a validation gap that could silently accept malformed origins. On the runtime side, Plan 9 now gets proper scheduler backoff handling [3] by joining Windows and BSD in the osHasLowResTimer guard, fixing goroutine steal performance dominance at high GOMAXPROCS. The ARM64 code generator also gained a new optimization [4] that fuses adjacent spill/reload instructions into paired STP/LDP operations during final code generation, improving memory traffic efficiency. Across the ecosystem, pkgsite is building vector search with Vertex AI [5], adding database migrations for pgvector [6] and synchronization infrastructure [7], while gopls continues a major CLI refactor [8] that separates global flags from subcommands and adds hierarchical error messages. VS Code Go shipped v0.56.0 [9], moving into v0.58.0-dev.
Action items
- → Update to latest Go tip if running ARM64 or ARM builds in production - the miscompilation fix prevents silent data corruption at boundary values golang/go [immediate]
- → Review any custom CORS origin validation logic if you're using net/http.CrossOriginProtection - userinfo rejection is now enforced golang/go [plan]
- → Update gopls when the CLI refactor lands - it fixes flag parsing hierarchies and startup speed golang/tools [monitor]
References
- [1] cmd/compile: prevent arm[64] noov InvertFlags miscompilation at min int golang/go
- [2] net/http: reject userinfo in CrossOriginProtection golang/go
- [3] runtime: add plan9 to osHasLowResTimer golang/go
- [4] cmd/compile/internal/arm64: fuse adjacent spill/reload STR/LDR into STP/LDP golang/go
- [5] internal/embeddings: add Vertex AI REST client golang/pkgsite
- [6] devtools, migrations: enable pgvector and add embeddings schema golang/pkgsite
- [7] internal/worker: integrate embeddings client into worker server configuration golang/pkgsite
- [8] gopls/internal/cmd: revamp CLI flag parsing golang/tools
- [9] Release v0.56.0 ↗ golang/vscode-go