Skip to content

Conversation

@nikita-dubrovskii
Copy link
Contributor

This fixes null pointer derefernce when VM starup fails:

--- FAIL: luks.cex (5.83s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x75d18a]

This fixes null pointer derefernce when VM starup fails:
```
--- FAIL: luks.cex (5.83s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x75d18a]
```
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a null pointer dereference in the luks.cex test that occurred when VM startup failed. The change moves the error handling to be immediately after the machine creation call, which prevents a nil machine instance from being used in subsequent operations, thus fixing the panic. The removal of the now-redundant, misplaced error check is also correct. The fix is clear, concise, and effectively resolves the reported issue.

Copy link
Member

@jbtrystram jbtrystram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikita-dubrovskii nikita-dubrovskii merged commit 8d41178 into coreos:main Oct 1, 2025
6 checks passed
@nikita-dubrovskii nikita-dubrovskii deleted the fix_cex_test branch October 1, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants