Stream: t-lang/wg-unsafe-code-guidelines

Topic: breaking async/await


gnzlbg (Aug 14 2019 at 12:44, on Zulip):

@comex I tried your async/await example without using thread-local storage

gnzlbg (Aug 14 2019 at 12:45, on Zulip):

(single thread, single task, immutable context, etc.)

gnzlbg (Aug 14 2019 at 12:46, on Zulip):

but I couldn't manage to get LLVM to misoptimize it

gnzlbg (Aug 14 2019 at 12:46, on Zulip):

the LLVM-IR emitted for the generator is just too messy

gnzlbg (Aug 14 2019 at 13:05, on Zulip):

i managed to get llvm to optimize the program to just a ret 0 or ret 1 from main

gnzlbg (Aug 14 2019 at 13:05, on Zulip):

but I am not able to cause the misoptimization

gnzlbg (Aug 14 2019 at 13:10, on Zulip):

https://github.com/gnzlbg/break_aw

gnzlbg (Aug 14 2019 at 13:11, on Zulip):

i've uploaded it there in case somebody wants to try

Last update: Nov 20 2019 at 11:30UTC