Check for nullptr before dereferencing#7708
Check for nullptr before dereferencing#7708dmcgowan merged 1 commit intocontainerd:mainfrom kiashok:CheckForNullptrs
Conversation
|
Hi @kiashok. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Thanks, but please sign the commit for DCO (run |
|
Could you pls add the same fix for |
|
Can we add a test case to cover this as well? This will also need backport to 1.6 branch, right? Is the same problem present in 1.5 branch? |
|
/ok-to-test |
Added the test. Yes this needs to be backported to 1.6. 1.5 branch does not have these changes so we could skip backporting there |
|
The linux integration test that is failing seems to be flaky and and is not related to any changes made in this PR. The changes in this PR is mostly on the windows side and I also see another PR that is failing at the same location (at log_hook.go at line 40) - https://github.com/containerd/containerd/actions/runs/3526988813/jobs/5915601489 . |
Signed-off-by: Kirtana Ashok <[email protected]>
This PR adds nullptr checks before dereferencing pointers in pkg/cri/server/helpers.go copyResourcesToStatus() function. The function was introduced as part of this PR.
While running some hcsshim tests, containerd crashed with a panic due to nullptr dereference and this PR attempts to fix that.