shirou / gopsutil

psutil for golang
Other
10.47k stars 1.58k forks source link

proc.openfiles() crash #1543

Closed RRancio closed 8 months ago

RRancio commented 10 months ago

Describe the bug you forgot a err handle

To Reproduce

case <-ch:
            fileInfo, _ := os.Stat(fileName)
            // if err != nil {
            //  continue
            // }
            if fileInfo.IsDir() {
                continue
            }

Expected behavior crashes :V Environment (please complete the following information): image

Additional context image

_btw file is processwindows.go

shirou commented 10 months ago

Could you update to the latest version v3.23.9 and try it again? The current version seems too old.