Skip to content
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

Fix shared image crash #538

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Fix shared image crash #538

merged 2 commits into from
Dec 20, 2024

Conversation

kring
Copy link
Member

@kring kring commented Dec 16, 2024

Fixes #537

This is pretty much the simplest possible fix. It copies shared images so that they are no longer shared.

@j9liu j9liu requested a review from azrogers December 16, 2024 21:23
@azrogers
Copy link
Contributor

Fix looks right to me. It could be just if (pImage->pAsset && pImage->pAsset->getDepot()) instead of the explicit null check, right?

@kring
Copy link
Member Author

kring commented Dec 20, 2024

Yeah, good point, changed. In general I don't mind being explicit about comparing to nullptr, but it was weird that I was comparing one pointer with an implicit check, and one pointer with an explicit check. I have no idea why I did that. 😆

@azrogers
Copy link
Contributor

With that, looks good! Thanks @kring!

@azrogers azrogers merged commit 0c2625f into main Dec 20, 2024
7 checks passed
@azrogers azrogers deleted the shared-image-crash branch December 20, 2024 15:06
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.

Race condition with shared images leads to crash
2 participants