[compiler-rt] [rtsan] Add test to ensure coroutines get caught (PR #111049)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 12:58:58 PDT 2024


cjappl wrote:

> My personal opinion on this one is that whether or not a coroutine allocates memory is irrelevant for realtime sanitizer, so I'm a bit skeptical of the value provided by this test. Memory allocation should be caught by our tests for `malloc` and friends - where that allocation ultimately comes from (at the widest part of the funnel) is imho immaterial.
> 
> In the hypothetical scenario that a valid coroutines implementation is able to begin a coroutine without allocating from the system, would this test start to fail erroneously?

Yeah, this is a good point. I think the specification also says:

>Each coroutine is associated with 
> ...
>the coroutine state, which is internal, dynamically-allocated storage (unless the allocation is optimized out), object that contains 

So maybe we can just close this and assume we are good in this case? I'm amenable to that. I initially went down this path just to confirm we were well behaved in this case.


https://github.com/llvm/llvm-project/pull/111049


More information about the llvm-commits mailing list