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

[columnar] fixes a state where an explain with cache on can cause a crash #125

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

JerrySievert
Copy link
Contributor

@JerrySievert JerrySievert commented Aug 2, 2023

While the head of the cache linked list should be created when a query is run, when a simple explain is run without running the query, the head is not initialized.

In addition, once it is initialized, it is not being set back to a full reset state of NULL.

What's changed?

A check is now made against head being NULL before attempting to iterate the linked list, and head is set to NULL again when a new memory context is created for the query. Since head is allocated in the query context, and the context is destroyed, this should be a-ok.

fixes #124

also, backports a check against another linked list that fails in assert when asserts are enabled.

@JerrySievert JerrySievert added the bug Something isn't working label Aug 2, 2023
@JerrySievert JerrySievert requested a review from wuputah August 2, 2023 20:03
@JerrySievert JerrySievert self-assigned this Aug 2, 2023
@JerrySievert JerrySievert force-pushed the cache_null_stats_dereference branch from b2f759a to 5b71c05 Compare August 2, 2023 20:28
@JerrySievert JerrySievert merged commit e8bc668 into main Aug 2, 2023
@JerrySievert JerrySievert deleted the cache_null_stats_dereference branch August 2, 2023 20:41
@wuputah wuputah added this to the 1.0.0-rc milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

explain crashes when cache is enabled
2 participants