emscripten-core / emscripten-core/emscripten

`EMULATE_FUNCTION_POINTER_CASTS` does not work `EXIT_RUNTIME`

Open
#15,081 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

When `EMULATE_FUNCTION_POINTER_CASTS` the addresses passed to the JS atexit implementation cannot be called because they all have a signature which is not callable from JS:

```
- type[0] (i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64) -> i64
...
Elem[1]:
- segment[0] flags=0 table=0 count=6 - init i32=1
- elem[1] = func[59]
```

This results in a crash during `callRuntimeCallbacks` because `makeDynCall` cannot be used to call such a function.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.