cloudwego / netpoll

A high-performance non-blocking I/O networking framework focusing on RPC scenarios.
Apache License 2.0
4.07k stars 470 forks source link

poll_default_linux.go:118, in `func (p *defaultPoll) handler`, `operator.Inputs(p.barriers[i].bs)`might be out of range #287

Closed ahfuzhang closed 1 year ago

ahfuzhang commented 1 year ago

see: https://github.com/cloudwego/netpoll/blob/cf96b810bf76819dc2e78f3218d192fe47f99b64/poll_default_linux.go#L156

pollArgs's member array barriers, the init size is 32. So when event count is bigger than 32, p.barriers[i] will out of range.

Am I right? I search all code like make([]barrier, no place but reset method to set the array size.

Thanks.

ahfuzhang commented 1 year ago

I miss the line a.events, a.barriers = make([]epollevent, size), make([]barrier, size) sorry

ahfuzhang commented 1 year ago

I make a mistake, sorry.