Skip to content

Avoid segfault with unknown versions #3666

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Jun 30, 2025

If the version does not parse, then semver returns nil.

It will still fail later on validation, but not crash...

Closes #3665

FATA[0000] the YAML is invalid, saved the buffer as "lima.REJECTED.yaml": can't parse builtin Lima version "<unknown>": <unknown> is not in dotted-tri format

If the version does not parse, then semver returns nil.

It will still fail later on validation, but not crash...

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@AkihiroSuda AkihiroSuda added this to the v1.1.2 milestone Jun 30, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit fed24da into lima-vm:master Jun 30, 2025
36 checks passed
Copy link
Member

@alexandear alexandear left a comment

Choose a reason for hiding this comment

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

I propose always adding a test for bug fixes (when possible), so we don't encounter the same bug again in the future.

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.

panic: runtime error: invalid memory address At pkg/limayaml/validate.go:47
3 participants