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

compute_results_count_sparse_string: using cached ranges properly. #3314

Merged

Conversation

KiterLuc
Copy link
Contributor

In #3263, compute_results_count_sparse_string now caches ranges to do
it's computations, so cached_ranges should be used instead of
range_indexes. This change fixes one place that still used range_indexes.


TYPE: IMPROVEMENT
DESC: compute_results_count_sparse_string: using cached ranges properly.

In #3263, compute_results_count_sparse_string now caches ranges to do
it's computations, so cached_ranges should be used instead of
range_indexes. This change fixes one place that still used range_indexes.

---
TYPE: IMPROVEMENT
DESC: compute_results_count_sparse_string: using cached ranges properly.
@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #18941: Heap corruption in compute_results_count_string.

Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

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

I confirm that this fixes the issue, but in the existing code, the loop variable to construct the caches is the same as the variable where they are used, so what caused the problem? Are we modifying ranges somewhere else?

i <- range_indexes refers into ranges which may be larger than cached_ranges.

@ihnorton ihnorton requested a review from johnkerl June 24, 2022 13:33
@ihnorton ihnorton merged commit 230f770 into dev Jun 24, 2022
@ihnorton ihnorton deleted the lr/result-count-sparse-string-cached-ranges-fix/ch18941 branch June 24, 2022 13:34
github-actions bot pushed a commit that referenced this pull request Jun 24, 2022
…3314)

In #3263, compute_results_count_sparse_string now caches ranges to do
it's computations, so cached_ranges should be used instead of
range_indexes. This change fixes one place that still used range_indexes.

---
TYPE: IMPROVEMENT
DESC: compute_results_count_sparse_string: using cached ranges properly.
ihnorton pushed a commit that referenced this pull request Jun 24, 2022
…3314)

In #3263, compute_results_count_sparse_string now caches ranges to do
it's computations, so cached_ranges should be used instead of
range_indexes. This change fixes one place that still used range_indexes.

---
TYPE: IMPROVEMENT
DESC: compute_results_count_sparse_string: using cached ranges properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants