-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
table index out of bounds when create a thread from within dynamic library (the thread function is defined in dynamic library) #19425
Comments
This should certainly work but you could have found a bug in our (experimental) support for dynamic linking + threading. Is there some way would could include a full sample? If not, perhaps you could share the full link command used for your main and your side modules? |
Do you mean by a minimum sample to reproduce this? run after running |
I realized that the minimum example code size is so small, after removing some visual noice, putting it here still got some readability main module
side module
|
The Godot Engine devs are waiting on a fix for this to get web platform support for GDExtension. |
After some more in-depth testing, it seems that our issue was a result of some functions not being properly exposed (we need to use Interestingly though, we do start thread functions defined in the side module, and yet they do seem to work now 👀 . The main difference I see with the reproduction project above is that we use |
Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.34 (57b21b8)
clang version 17.0.0 (https://github.com/llvm/llvm-project a031f72187ce495b9faa4ccf99b1e901a3872f4b)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: D:\emsdk\upstream\bin
Failing command line in full:
worker.js onmessage() captured an uncaught exception: RuntimeError: table index is out of bounds
i'm trying to spawn a function defined in dynamical library.but I always get table index outof bounds, what are the alternatives? or is it simply impossible?
the defined function is not called by any other threads but this one, and the thread is immediately joined, the function is doing harmless things none other than calculations and printing stuff, there's no harmful api calls at all, this should be possible in the web sandbox since it can set the PC to the corresponding symbol start. but it seems the access is restricted.
The text was updated successfully, but these errors were encountered: