Skip to content

Instantly share code, notes, and snippets.

@zzstoatzz
Created January 26, 2026 21:36
Show Gist options
  • Select an option

  • Save zzstoatzz/599ea3a29627889457ff7143be245bcb to your computer and use it in GitHub Desktop.

Select an option

Save zzstoatzz/599ea3a29627889457ff7143be245bcb to your computer and use it in GitHub Desktop.
MRE: tap v0.1.4 nil pointer dereference (firehose.go:184)
#!/bin/bash
# MRE: tap v0.1.4 nil pointer dereference when evt.PrevData is nil
# Bug: firehose.go:184 calls evt.PrevData.String() without nil check
# https://github.com/bluesky-social/indigo/blob/tap-v0.1.4/cmd/tap/firehose.go#L184
set -e
dir=$(mktemp -d)
trap "rm -rf $dir" EXIT
cd "$dir"
cat > main.go << 'GO'
package main
import comatproto "github.com/bluesky-social/indigo/api/atproto"
func main() {
// This is what firehose.go:184 does in tap v0.1.4
evt := &comatproto.SyncSubscribeRepos_Commit{PrevData: nil}
_ = evt.PrevData.String() // BOOM
}
GO
go mod init mre >/dev/null 2>&1
go get github.com/bluesky-social/indigo@tap-v0.1.4 >/dev/null 2>&1
go mod tidy >/dev/null 2>&1
echo "tap v0.1.4 nil PrevData MRE - expect crash:"
go run .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment