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
For this condition if len(paths) == 0 (empty array) this code will be executed: os.Stat(paths[0]).
Probably will end with panic: runtime error: index out of range [0] with length 0
It was introduced in #7089 (exactly in this commit: 2a7bf89) after discussion between @andrenth and @danielnelson.
I can fix this but I need a guidance about desired behavior.
The text was updated successfully, but these errors were encountered:
I think this is a leftover from the previous commit which tried to allow an empty match on the glob but forbid a nonexistent static path. It seems to me the fix is to simply remove the os.Stat call and just return the error as @ssoroka mentioned, ie.
Found possible problem with index out of range in
plugins/inputs/phpfpm/phpfpm.go
:For this condition
if len(paths) == 0
(empty array) this code will be executed:os.Stat(paths[0])
.Probably will end with
panic: runtime error: index out of range [0] with length 0
It was introduced in #7089 (exactly in this commit: 2a7bf89) after discussion between @andrenth and @danielnelson.
I can fix this but I need a guidance about desired behavior.
The text was updated successfully, but these errors were encountered: