Skip to content

When a pthread fails initialisation the wrong error is thrown #8446

Closed
@VirtualTim

Description

@VirtualTim

Unless I'm missing something, if Module['dynCall_ii'](e.data.start_routine, e.data.arg); (here) throws, Module['_emscripten_futex_wake'] (here) will be undefined. This means that whatever error was actually caught will never be re-thrown, and Module._emscripten_futex_wake is not a function will always be thrown instead.

In ideal situations this should of course never occur, but it does lead to some misleading errors during development/debugging.

I'm tempted to submit a PR just removing that _emscripten_futex_wake, because I'm not sure what value it adds. If this function call actually has a use I could just open a PR when the called is wrapped in a if (typeof(Module["_emscripten_futex_wake"]) === function) {...}

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions