Skip to content

Stack corruption in a concurrent suspension/unsuspension scenario #20058

Open
@mboc-qt

Description

@mboc-qt

Version of emscripten/emsdk:
3.1.44

Failing command line in full:
make && cd build && emrun main.html

Full link command and output with -v appended:
See Makefile

When an operation from a dynamic callback is unsuspended, and the code originating at main() has been suspended and unsuspended in the meantime, the stack gets corrupted.
To reproduce, simply run the program as specified in the 'failing command line' section. You should be seeing an error in the console after 5 seconds - the test map in timer callback seems to have been somehow meddled with.
This only happens if the loop in the code is outside of the suspended method for some reason - see the comments in code.

suspend.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions