-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: runtime error: SIGSEGV on non existing directory #390
Labels
Comments
Just ran into this as well when testing on file/directory without enough permission to create the log file. |
akshayjshah
pushed a commit
that referenced
this issue
Mar 28, 2017
If the config struct includes invalid output paths, make sure that we don't try to execute a nil function pointer. Fixes #390.
Thanks for the bug report! This should be fixed in #394. Once that lands, I'll cut a new release. |
prashantv
added a commit
that referenced
this issue
Mar 29, 2017
Config assumes that Open will always return a close function which causes a panic when Open returns an error, since it doesn't return a close function. We can instead clean up the assumption that we return partial values on error, and instead use a more common pattern: - On success, `err == nil` and all other return values are valid - On error, `err != nil` and all other return values are zero values Fixes #390.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
There is panic (trying to execute nil function) when there is the directory non exists.
After run:
The problem is in
go.uber.org/zap/config.go#220 and 225-226
in openSinks method - there should be check for nil clouseOut/closeErr or zap.Open should return nopcloser function.The text was updated successfully, but these errors were encountered: