This is an archive of the discontinued LLVM Phabricator instance.

Playing with tokens OR breaking coroutines manually
AbandonedPublic

Authored by jdoerfert on Feb 25 2017, 2:39 AM.

Details

Reviewers
GorNishanov
Summary
After "breaking"* the coroutine code manually:
  - 4 of 6 tests pass,
  - one performs differently than expected and therefor fails, and
  - one crashes with a weird assumptions

All in all it seems the tests/verifier could be more rigorous to
identify broken input.
  • I am not a coroutines expert, I was merely playing around with tokens to see what kind of "transformation" they prevent in this setting. While I think the code is broken it might actually be well defined.

Event Timeline

jdoerfert created this revision.Feb 25 2017, 2:39 AM
GorNishanov requested changes to this revision.EditedMar 5 2017, 7:09 AM

I agree that verifier could be more rigorous with checking that coroutine intrinsics are used properly, but, I would not want to change the tests ex0 - ex5.ll as you suggested.
ex?.ll tests are examples from the coroutine walkthrough in LLVM Coroutines doc and I would like to keep them in sync with the tutorial. They represent minimally useful, but still sensible coroutines.

I would not object of adding new tests along the lines that your suggested (possibly with verifier changes to give better diagnostics) where assumptions about coroutine structure are violated.

And I would like to add that I appreciate very much your interest in LLVM coroutines and proposing this patch.

This revision now requires changes to proceed.Mar 5 2017, 7:09 AM

I agree that verifier could be more rigorous with checking that coroutine intrinsics are used properly, but, I would not want to change the tests ex0 - ex5.ll as you suggested.
ex?.ll tests are examples from the coroutine walkthrough in LLVM Coroutines doc and I would like to keep them in sync with the tutorial. They represent minimally useful, but still sensible coroutines.

I would not object of adding new tests along the lines that your suggested (possibly with verifier changes to give better diagnostics) where assumptions about coroutine structure are violated.

And I would like to add that I appreciate very much your interest in LLVM coroutines and proposing this patch.

Please do not get me wrong, I do not want to change the tests (as in the patch)! I merely want to point out that the verifier and the coverage are not that good and with the changed tests I wanted to show why.

jdoerfert abandoned this revision.Jun 4 2019, 10:11 PM