Skip to content
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

Doesn't work with Emscripten #132

Open
Maeiky opened this issue Jul 13, 2020 · 2 comments
Open

Doesn't work with Emscripten #132

Maeiky opened this issue Jul 13, 2020 · 2 comments

Comments

@Maeiky
Copy link

Maeiky commented Jul 13, 2020

I just try it out with Emscripten to use Cello on the Web. But unfortunately it doesn't work

Here is my log:


Shell_Common.js:513 atexit() called, but EXIT_RUNTIME is not set, so atexits() will not be called. set EXIT_RUNTIME to 1 (see the FAQ)
printErr @ Shell_Common.js:513
Shell_Common.js:490
Shell_Common.js:490 +-------------------------------------------+
Shell_Common.js:490 | ptest MicroTesting Magic for C |
Shell_Common.js:490 | |
Shell_Common.js:490 | https://github.com/orangeduck/ptest |
Shell_Common.js:490 | |
Shell_Common.js:490 | Daniel Holden ([email protected]) |
Shell_Common.js:490 +-------------------------------------------+
Shell_Common.js:513 Calling stub instead of signal()
printErr @ Shell_Common.js:513
Shell_Common.js:513 Calling stub instead of signal()
printErr @ Shell_Common.js:513
Shell_Common.js:513 Calling stub instead of signal()
printErr @ Shell_Common.js:513
Shell_Common.js:490
Shell_Common.js:490
Shell_Common.js:490 ===== Suite Array =====
Shell_Common.js:490
Shell_Common.js:513 Invalid function pointer '1020' called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)
printErr @ Shell_Common.js:513
Shell_Common.js:513 This pointer might make sense in another type signature: i: 0 iii: 0 iiii: 0 iiiii: undefined vii: 0 di: undefined vi: 0 viii: 0 v: 0 viiii: 0 viiiii: 0 viiiiii: 0
printErr @ Shell_Common.js:513
Shell_Common.js:490 1020
Shell_Common.js:513 1020
printErr @ Shell_Common.js:513
Shell_Common.js:513 exception thrown: abort(1020) at Error
at jsStackTrace (http://localhost:6931/App.js:1107:13)
at stackTrace (http://localhost:6931/App.js:1124:12)
at abort (http://localhost:6931/App.js:162179:44)
at nullFunc_ii (http://localhost:6931/App.js:5750:876)
at Array.b2184 (http://localhost:6931/App.js:133200:13)
at Array._Array_Assign (http://localhost:6931/App.js:8487:38)
at _assign (http://localhost:6931/App.js:8791:34)
at _copy (http://localhost:6931/App.js:6589:9)
at Array._test_array_new (http://localhost:6931/App.js:38249:9)
at _pt_run (http://localhost:6931/App.js:37842:31)
printErr @ Shell_Common.js:513
App.js:41 Uncaught abort(1020) at Error
at jsStackTrace (http://localhost:6931/App.js:1107:13)
at stackTrace (http://localhost:6931/App.js:1124:12)
at abort (http://localhost:6931/App.js:162179:44)
at nullFunc_ii (http://localhost:6931/App.js:5750:876)
at Array.b2184 (http://localhost:6931/App.js:133200:13)
at Array._Array_Assign (http://localhost:6931/App.js:8487:38)
at _assign (http://localhost:6931/App.js:8791:34)
at _copy (http://localhost:6931/App.js:6589:9)
at Array._test_array_new (http://localhost:6931/App.js:38249:9)
at _pt_run (http://localhost:6931/App.js:37842:31)


See my fork to get this result:
https://github.com/Cwc-Lib/Cello

@Maeiky
Copy link
Author

Maeiky commented Jul 17, 2020

Well, by disabling GC (CELLO_NGC) and some tests, we can get an interesting result.
Try it out here:
Test Suite

However, we have to remove the following tests to avoid a crash:

  • suite_array
  • suite_file
  • suite_float
  • suite_list
  • suite_mutex
  • suite_thread
  • suite_zip
  • suite_exception

@orangeduck
Copy link
Owner

Nice! I don't know what the error before was but I guess perhaps Emscripten doesn't like the GC scanning the stack...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants