[Bug sanitizer/95137] Sanitizers seem to be missing support for coroutines

niekb at scintilla dot utwente.nl gcc-bugzilla@gcc.gnu.org
Tue Sep 28 19:56:47 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95137

--- Comment #43 from niek <niekb at scintilla dot utwente.nl> ---
(In reply to Rafael Avila de Espindola from comment #29)
> Created attachment 48771 [details]
> Testcase without lambda coroutines
> 
> I modified the testcase to also build with clang and not depend on async
> lambdas. This still reproduces the problem with gcc with undefined behaviour
> sanitizer, but works with with clang and sanitizers and gcc with valgrind.

Hi Rafael,

I tried your testcase on GCC trunk today (2021-09-28), and the testcase now
seems to pass (!), even with asan and ubsan enabled.

I tested with Compiler Explorer, with options

  -std=c++20 -g -fcoroutines -fsanitize=address,undefined 

and with the "compile to binary" and "execute the code" options.

The only thing is that I had to include the <utility> header; gcc was
complaining about not finding std::exchange.

Does this mean (and could you please reconfirm) that bug 95317 has disappeared
in trunk (which will become GCC 12)?


More information about the Gcc-bugs mailing list