check_suspend_flags() doesn't insert the logic to check suspend_flags unless the module's default memory is marked "shared".
while the heuristic works fine for common cases, it's wrong because:
it's perfectly legal to use threads w/o linear memory.
wasm_runtime_terminate() doesn't require shared linear memory or threads.
check_suspend_flags() doesn't insert the logic to check suspend_flags unless the module's default memory is marked "shared". while the heuristic works fine for common cases, it's wrong because: