You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this! My initial suspicion is around re-use of the underlying data buffers via sync.Pool here, which we may need to defer putting back into the pool until after the handler has run: https://github.com/danielgtaylor/huma/blob/main/huma.go#L1289-L1290. I will do some testing on my side to confirm and fix ASAP.
I think we have spotted a data race when consuming the raw body of the input across multiple go routines.
Here a minimal environment where we manage to reproduce this: https://github.com/jonandernovella/huma-par-body/tree/main
One may detect the data race running:
go test -v -race
The text was updated successfully, but these errors were encountered: