The Wire · Showcase
SUFFIX ARRAY PANIC FIX AND BUILD CONSTRAINT BUG LAND IN COMPILER CHANGES
By RepoJournal · Filed · About Go
Go's standard library is hardening against corrupted data while the compiler fixes a critical precedence bug in build constraints that affects real codebases today.
The index/suffixarray package now reports errors instead of panicking when it encounters corrupted data [1], with additional boundary checks to prevent index-out-of-bounds crashes [2] — both trivial fixes that prevent silent failures in production. Meanwhile, cmd/dist landed a fix for a long-standing bug in build constraint evaluation where `gccgo && gc || gc` incorrectly evaluated to false instead of true [3][4], a precedence issue the previous implementation had that's now resolved using go/build/constraint. On the http2 front, the net package is stabilizing its http2wrap support by switching from DefaultTransport to an empty Transport during initialization [5], improving correctness when users don't explicitly configure http2. The compiler itself is tightening generic method handling by asserting byte stream version V4 at the type level [6], preventing silent drops of generic methods for experimental Go 1.27 users. pkg.go.dev shipped a search performance optimization [7] that dynamically calculates database limits based on offset and limit parameters, cutting latency while preserving correct grouping, and fixed a `latest` version resolution bug in GetModulePackages [8]. Tools saw a fix for gopls hover logic that was incorrectly including comments due to unchecked BinarySearchFunc results [9], plus a js platform test suppression [10].
Action items
- → Review build constraints in your codebase if you use complex && || combinations — test after next Go update golang/go [plan]
- → No immediate action required for most projects, but monitor suffix array usage in data processing pipelines golang/go [monitor]
- → If running experimental genericmethods, verify you're building with GOEXPERIMENT=genericmethods set golang/go [monitor]
References
- [1] index/suffixarray: report error rather than panic for corrupted data golang/go
- [2] index/suffixarray: protect against another data corruption golang/go
- [3] cmd/dist: use go/build/constraint to parse build constraints golang/go
- [4] cmd/dist: add a 'gccgo && gc || gc' build constraint testcase golang/go
- [5] http2: use empty Transport rather than DefaultTransport in http2wrap golang/net
- [6] cmd/compile/internal/noder: hoist up generic methods assertion golang/go
- [7] internal/api: optimize search performance golang/pkgsite
- [8] internal/postgres: fix GetModulePackages for latest golang/pkgsite
- [9] gopls/internal/golang: fix invalid comment on hover golang/tools
- [10] internal/typesinternal/typeindex: suppress test on js golang/tools
FAQ
- What changed in Go on May 5, 2026?
- Go's standard library is hardening against corrupted data while the compiler fixes a critical precedence bug in build constraints that affects real codebases today.
- What should Go teams do about it?
- Review build constraints in your codebase if you use complex && || combinations — test after next Go update • No immediate action required for most projects, but monitor suffix array usage in data processing pipelines • If running experimental genericmethods, verify you're building with GOEXPERIMENT=genericmethods set
- Which Go repositories shipped on May 5, 2026?
- golang/go, golang/net, golang/pkgsite, golang/tools