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
It works well in general, but when specifying 3 or more B's using CMD flags the program segfaults. This is caused due to an error being thrown in the ReadFromFile function, where os.Stat(s) returns an error which was not being covered by os.IsNotExist(err). After that info.IsDir() is called but info is undefined at that point
Just curious, what is the input string length max?
Not sure, somewhere between specifying 2 and 3 broadcaster prices :p OS.Stat returns an error after some point where the input string is too long to be a file path/directory. A nice edge case which wasn't being checked for or covered by unit tests
Edit: basically what happened is os.Stat(s) returns an error which was not being covered by os.IsNotExist(err). After that info.IsDir() is called but info is undefined at that point
It works well in general, but when specifying 3 or more B's using CMD flags the program segfaults. This is caused due to an error being thrown in the
ReadFromFile
function, whereos.Stat(s)
returns an error which was not being covered byos.IsNotExist(err)
. After thatinfo.IsDir()
is called butinfo
is undefined at that pointgo-livepeer/cmd/livepeer/starter/starter.go
Line 1413 in 8bd65fb
go-livepeer/common/readfromfile.go
Lines 12 to 19 in 8bd65fb
Entire segfault:
Proposed solution is to return the string as-is if the
ReadFromFile
errorsEdit: this issue probably only occurs when using CMD flags to
The text was updated successfully, but these errors were encountered: