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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The return statement in the OpenFifo wrapper function implicitly boxes the *fifo pointer into an io.ReadWriteCloser interface value, even when the value is (*fifo)(nil). It is the same gotcha described in https://go.dev/doc/faq#nil_error and causes the same sorts of confusing situations. Modify the OpenFifo wrapper function to return a nil interface value when openFifo returns a nil pointer value.
The return statement in the OpenFifo wrapper function implicitly boxes
the *fifo pointer into an io.ReadWriteCloser interface value, even when
the value is (*fifo)(nil). It is the same gotcha described in
https://go.dev/doc/faq#nil_error and causes the same sorts of confusing
situations. Modify the OpenFifo wrapper function to return a nil
interface value when openFifo returns a nil pointer value.
Signed-off-by: Cory Snider <csnider@mirantis.com>
The reason will be displayed to describe this comment to others. Learn more.
Oh! Not a blocker (at all), but if you want to reduce code-churn, perhaps reformat the octal values to the new format (0o600) while updating these lines
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The return statement in the
OpenFifo
wrapper function implicitly boxes the*fifo
pointer into anio.ReadWriteCloser
interface value, even when the value is(*fifo)(nil)
. It is the same gotcha described in https://go.dev/doc/faq#nil_error and causes the same sorts of confusing situations. Modify theOpenFifo
wrapper function to return anil
interface value whenopenFifo
returns anil
pointer value.(*fifo)(nil)
value could escape the package, and therefore the root cause of SIGSEGV dockerd 20.10.2 docker/for-linux#1186 for which fifo.Close(): prevent possible panic if fifo is nil #32 was added as a workaround.