• Brian Gesiak's avatar
    Always suspend coroutine before destruction · 57c236fe
    Brian Gesiak authored
    Summary:
    Suspending the coroutine before it's destroyed prevents a dangling
    reference to its value.
    
    This dangling reference is exposed when running tests that were
    built with `-O3` with ASAN. To run tests at this level, split the
    tests up: move tests that cannot be compiled with ASAN at `-O3`,
    due to https://bugs.llvm.org/show_bug.cgi?id=34289, into their
    own file. The remaining tests stay where they are, with `-O3`
    re-enabled.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D7130814
    
    fbshipit-source-id: bf3e2b8f4a086f1786ab46f453c3dd9171d018e8
    57c236fe
OptionalCoroutinesTest.cpp 2.18 KB