tcbrindle / flux

A C++20 library for sequence-orientated programming
https://tristanbrindle.com/flux/
Boost Software License 1.0
441 stars 28 forks source link

Fix clang-tidy warning in `indexed_bounds_check_fn::operator()` #178

Closed braxtons12 closed 4 months ago

braxtons12 commented 4 months ago

Fix use-after-move of loc

Closes #176

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.06%. Comparing base (8ae438b) to head (702f989).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #178 +/- ## ======================================= Coverage 98.06% 98.06% ======================================= Files 69 69 Lines 2426 2426 ======================================= Hits 2379 2379 Misses 47 47 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tcbrindle commented 4 months ago

It looks like our Asan CI test has suddenly started timing out for some reason (it was fine yesterday...), but this PR looks good to me. Thanks @braxtons12!

braxtons12 commented 4 months ago

It looks like our Asan CI test has suddenly started timing out for some reason (it was fine yesterday...), but this PR looks good to me. Thanks @braxtons12!

I saw that. I don't think I've ever actually seen a bad_alloc in the wild, really curious. Given this was removing an instance of what could be argued to be UB, my "knee jerk" assumption would be that an optimization is no longer happening, and that's causing it to stall. But given the Asan build is a debug build and UBsan builds passed before this, that rules that out. Really curious.

tcbrindle commented 4 months ago

Yeah, I'm mystified.

As a check, I re-ran the Asan build with on the main branch -- which passed when I ran it yesterday! -- and it also timed out. So it's definitely not this PR :)

What's really weird is that sometimes the check will hang whilst in the building phase (specifically, linking libcatch) and sometimes it will make it as far as testing before hanging and eventually terminating with a bad_alloc.

I really don't understand what's going on, so I've just disabled the sanitizer builds for now and hopefully it'll mysteriously start working again in a couple of days! 🤷🏻‍♂️