nestedvm
nestedvm copied to clipboard
"Jumped to invalid address in trampoline"
I've finally gotten nestedvm to compile (I'd add MAKEINFO=true
to the make dist ...
arguments, in the README), but I have yet to successfully run a translated class. For instance, I have a test cc.c
in /tmp/
:
#include <stdio.h>
int test(int x) {
return x*4;
}
int main(int argc, char **argv) {
printf("hello moon!\n");
return test(1717);
}
And in upstream/install/bin/
I run
./mips-unknown-elf-gcc -o /tmp/cc /tmp/cc.c
and get
/home/erhannis/Documents/workspace/nestedvm/install/bin/../lib/gcc/mips-unknown-elf/4.8.5/../../../../mips-unknown-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000010000
but it seeeems to work. So I run either
java -jar nestedvm.jar /tmp/cc
or
java -jar compiler.jar -outfile /tmp/cc.class cc /tmp/cc
java -cp /tmp/:unix_runtime.jar cc
and in either case I get similar errors
org.ibex.nestedvm.Runtime$ExecutionException: Jumped to invalid address in trampoline (r2: -1 pc: -559038737) at (unknown)
at cc.trampoline(/tmp/cc)
at cc._execute(/tmp/cc)
at org.ibex.nestedvm.Runtime.__execute(Runtime.java:511)
at org.ibex.nestedvm.Runtime.execute(Runtime.java:528)
at org.ibex.nestedvm.Runtime.run(Runtime.java:550)
at org.ibex.nestedvm.Runtime.run(Runtime.java:543)
at org.ibex.nestedvm.Runtime.run(Runtime.java:542)
at cc.main(/tmp/cc)
Process exited on signal 4
or
Instansiated: nestedvm.runtimecompiled@156643d4
org.ibex.nestedvm.Runtime$ExecutionException: Jumped to invalid address in trampoline (r2: -1 pc: -559038737) at (unknown)
at nestedvm.runtimecompiled.trampoline(Unknown Source)
at nestedvm.runtimecompiled._execute(Unknown Source)
at org.ibex.nestedvm.Runtime.__execute(Runtime.java:511)
at org.ibex.nestedvm.Runtime.execute(Runtime.java:528)
at org.ibex.nestedvm.UnixRuntime.executeAndExec(UnixRuntime.java:501)
at org.ibex.nestedvm.UnixRuntime.runAndExec(UnixRuntime.java:495)
at org.ibex.nestedvm.RuntimeCompiler.main(RuntimeCompiler.java:69)
Process exited on signal 4
Any idea what's up? (I'd also gotten similar results with an effectively-empty main method, but this was the code I'd most recently tested, anyway.)