-
Notifications
You must be signed in to change notification settings - Fork 311
Closed
Description
It seems that there is a problem while running some asm.js code with the spider monkey engine. This does not appear using the v8 engine or directly running the code in firefox.
Here are the steps to reproduce the problem:
First paste the following C code in a file (compute the 45th fibonacci number)
#include <stdio.h>
int fib(int x) {
if (x < 2) {
return 1;
} else {
return fib(x - 1) + fib(x - 2);
}
}
int main() {
int result = fib(45);
printf("%d\n", result);
return 1;
}
Then compile to in asm.js with emscripten:
$ emcc -O1 -s ASM_JS=1 ./fibonacci.cpp
Finally try run it with jxcore, compiled with SpiderMonkey ($ curl http://jxcore.com/xil.sh | bash -s force sm). This will result in a segfault
$ jx a.out.js
Segmentation fault (core dumped)
Additional infos:
$ jx -jsv
Mozilla SpiderMonkey v34
$ jx -jxv
v 0.3.0.7
$ uname -a
Linux user-pc 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Metadata
Metadata
Assignees
Labels
No labels