-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Description
go version go1.23.2 linux/amd64
Happened only once, so not sure how to reproduce it, however calling rand.read with a rngSource caused a panic, see stack trace below. It was called in a 3rd party library, but if that matters the buffer slice given to the read method has a hardcoded size of 56, and rand instance was created with rand.NewSource(time.Now().UnixNano())
panic: runtime error: index out of range [-1]
goroutine 138 [running]:
math/rand.(*rngSource).Uint64(...)
/usr/local/go/src/math/rand/rng.go:249
math/rand.(*rngSource).Int63(...)
/usr/local/go/src/math/rand/rng.go:234
math/rand.read({0xc000117680, 0x38, 0xc000df1888?}, {0x1eb34e0?, 0xc000375500?}, 0xc000364a70, 0xc000364a78)
/usr/local/go/src/math/rand/rand.go:285 +0x185
math/rand.(*Rand).Read(0xc000bcf0e0?, {0xc000117680?, 0x7f1d0cc6c108?, 0x30?})
/usr/local/go/src/math/rand/rand.go:275 +0x65
.
.
.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.