[vm/ffi] Requesting isolate shutdown in a callback
We should check that the FFI does not swallow isolate shutdown requests.
It should probably return the error value to C, let C unwind its stack, and continue unwinding the dart stack upon returning to Dart.
@rmacnak-google @liamappelbe based on the test that we added, is anyone working on this? Or did we simply add a test for documentation?
I'm not working on a fix, I just wanted to added the test while it was fresh in my mind.
I'm not working on it at the moment.
Propagating unwind error will need checking on return from non-leaf ffi calls. In some sense this is similar to b113fffb65a002accf53724e5d57110ad215b5f7 which has added checking whether return values are exceptions and need to be propagated.
@dcharkes maybe you can add this issue to your list?
The ffi/callback_unwind_error_test flaked again today.
The work to make flutter hot-restart work better will require shutting the entire isolate group down on flutter hot-restart, which will send kill messages to isolates, which in return will require solving this issue.
Ran into this in our fork, went to fix it, and then tried it in stable dart and realized it fails there too. (Testing on Mac ARM64 dart 3.7.0)