| 7 | } |
| 8 | |
| 9 | int main() { |
| 10 | printf("main\n"); |
| 11 | try { |
| 12 | // `foo` calls `exit()` which triggers the runtime to exit and then |
| 13 | // the stack to unwind. |
| 14 | // This test verifies that we don't error during the unwinding due |
| 15 | // to the runtime having already exited. |
| 16 | foo(); |
| 17 | } catch(...) { |
| 18 | printf("caught\n"); |
| 19 | } |
| 20 | } |