This is another error here.

GuardWithTest adapter try to report a NPE but
fillInStackTrace() crash when walking the stack to gather all frames.

The good question is how GuardWithTest can throw a NPE
knowing that test, target and fallback are null checked before
its creation.

By the way, John :
in MethodHandleImpl.makeGuardWithTest()
the code :
MethodHandle gtest = spreadArguments(token, test, gtype.changeReturnType(boolean.class), 0); MethodHandle gtarget = spreadArguments(token, target, gtype, 0); MethodHandle gfallback = spreadArguments(token, fallback, gtype, 0); MethodHandle gguard = new GuardWithTest(GuardWithTest.VARARGS_INVOKE, gtest, gtarget, gfallback); if (gtest == null || gtarget == null || gfallback == null) return null;
            return collectArguments(token, gguard, type, 0, null);

should be :
MethodHandle gtest = spreadArguments(token, test, gtype.changeReturnType(boolean.class), 0); MethodHandle gtarget = spreadArguments(token, target, gtype, 0); MethodHandle gfallback = spreadArguments(token, fallback, gtype, 0); if (gtest == null || gtarget == null || gfallback == null) return null; MethodHandle gguard = new GuardWithTest(GuardWithTest.VARARGS_INVOKE, gtest, gtarget, gfallback);
            return collectArguments(token, gguard, type, 0, null);

the null check should before the creation of the guard.

Anyway, these doesn't solve the problem.

Charles, could you try with -Xint, just to see if the NPE is still thrown or not ?

cheers,
Rémi



Le 02/08/2009 23:42, Attila Szegedi a écrit :
Specifically, in my case emitting a class through ASM that has this in
it:

          mv.visitMethodInsn(INVOKEDYNAMIC, "java/dyn/InvokeDynamic",
"dyn:getprop:helloText", "(Ljava/lang/Object;)Ljava/lang/String");

crashes the JVM sometime after it loads the class. Note how there's no
semicolon after "Ljava/lang/String"

Attila.

On 2009.08.02., at 23:34, Attila Szegedi wrote:

I too managed to crash it yesterday, but it turned out I
accidentally emitted invalid bytecode from ASM - I forgot to end the
binary name of a class with semicolon in method signature of an
invokedynamic instruction. Amazingly, neither ASM nor the verifier
caught it.  The crash message was something along the lines of
"ShouldNotBeHere" or similar :-)

All I want to say is, in my case it crashed because I fed it
garbage. Not necessarily true in your case, but worth doublechecking
what you do (knowing you, you probably did it anyway before posting).

Attila.

On 2009.08.02., at 22:12, Charles Oliver Nutter wrote:

Ok, finally circled back around to testing things again. With
Attila's
build, I'm still getting crashes, but more seems to work.

I've attached the dump from the crash. To reproduce:

1. grab and unpack a JRuby nightly from
2. set MLVM into JAVA_HOME
3. run bin/jruby -J-Djruby.compile.invokedynamic=true
-J-XX:+EnableInvokeDynamic bench/bench_fib_recursive.rb 100

It should blow up pretty quickly. I have not had opportunity to
narrow
it down any more than this.

Because of the crashing, it's difficult for me to move forward on
indy
work :( I'm standing by to do anything I can do to help figure it
out.

- Charlie
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to