Repository navigation
Fix review findings in coroutines, contains, and segmented comparisons - #8211
Conversation
The final awaiter of coroutines returning hpx::future gives up the coroutine's reference with a release-only decrement. As in intrusive_ptr_release, the thread that drops the last reference needs an acquire fence before it destroys the shared state, so that the destruction is ordered after the writes of the other holders. Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
The sequential search computed the length of the range first. For a single-pass range (std::istream_iterator, for instance) that consumed the input, so the search found nothing. loop_pred stops at the end of the range anyway. Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
When the two ranges of a segmented equal or mismatch are on different localities, the values of the second range are captured and compared on the locality of the first. The comparison passed mutable references to these values to the predicate, even if the second range has const elements; on the same locality the predicate sees const references. Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
The parallel segmented mismatch returned the first mismatch of a batch without looking at the comparisons that came after it, so an error of one of those was lost. Collect the results of the batch with get_capture_results, which reports the errors of all its comparisons. Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
The test returned 0, so its HPX_TEST failures didn't change its exit status. Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Up to standards ✅🟢 Issues
|
These are the review findings on the V2.0.1 release PR #8099 that apply to master as well and have a small, self-contained fix. All code involved came from earlier PRs, so the fixes go to master first and can then be picked into 2.0.1.
hpx::future(Fix use after free of coroutine frames returning hpx::future #8126): the final awaiter now issues the acquire fence after the coroutine gives up the last reference to its shared state, asintrusive_ptr_releasedoes. The decrement is a release only, so without the fence the destruction of the stored result was not ordered after the writes of the other holders.hpx::ranges::containswithout a policy (Accept a sentinel of a different type in ranges::contains and the two-range ranges::transform #8130): the sequential search no longer measures the range before it searches it. For a single-pass range (for instancestd::istream_iterator) the length prepass consumed the input, so the search found nothing.contains_rangetests this now.equalandmismatchacross localities (fix: handle segmented comparison alignment #7815): when the second range has const elements, the comparison of the captured values passes const references to the predicate, as it does when both ranges are on the same locality.mismatch(fix: handle segmented comparison alignment #7815): an error of a comparison in a batch is reported even if an earlier comparison of the same batch found a mismatch.static_chunker_2282(Don't make processing_units_count of num_cores and task_size_chunk_size noexcept #7976): the test returns the result ofhpx::util::report_errors()instead of 0.