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
1、Define the empty reponse message XXXRes { }
2、Write an arbitrary compressor and register it (encoding.RegisterCompressor(compressor))
3、Triggering the request
4、When the request returns,have a panic,'index out of range [-1]'
Operating System
macos
Go Version
go 1.22.1
Package Version
all version
Affected Packages
protobuf/grpc_compress.go
Expected Behavior
returned normally
Actual Behavior
panic index out of range [-1]
Reproduction Steps
1、Define the empty reponse
message XXXRes { }
2、Write an arbitrary compressor and register it (encoding.RegisterCompressor(compressor))
3、Triggering the request
4、When the request returns,have a panic,'index out of range [-1]'
Other Information
mcache.Free
func Free(buf []byte) {
size := cap(buf)
if !isPowerOfTwo(size) {
return
}
buf = buf[:0]
caches[bsr(size)].Put(buf)
}
when size = 0,bsr(size) return -1
caches[-1] = nil
The text was updated successfully, but these errors were encountered: