joa/apparat

java.lang.RuntimeException: finddef

gonchar opened this issue · 5 comments

Thank you for your great tools! I always use them.

I've caught an error, and can't to process my swf
stripper, scala 2.9.2

<function0>: caught java.lang.RuntimeException: finddef
java.lang.RuntimeException: finddef
        at scala.sys.package$.error(package.scala:27)
        at scala.Predef$.error(Predef.scala:123)
        at apparat.bytecode.BytecodeDecoder$.readOp$1(BytecodeDecoder.scala:115)

        at apparat.bytecode.BytecodeDecoder$.build$1(BytecodeDecoder.scala:245)
        at apparat.bytecode.BytecodeDecoder$.apply(BytecodeDecoder.scala:252)
        at apparat.bytecode.Bytecode$.fromBody(Bytecode.scala:37)
        at apparat.abc.Abc$$anonfun$loadBytecode$2$$anonfun$apply$1.apply$mcV$sp
(Abc.scala:138)
        at apparat.abc.Abc$$anonfun$loadBytecode$2$$anonfun$apply$1.apply(Abc.sc
ala:136)
        at apparat.abc.Abc$$anonfun$loadBytecode$2$$anonfun$apply$1.apply(Abc.sc
ala:136)
        at scala.actors.Futures$$anonfun$1.apply(Future.scala:127)
        at scala.actors.Futures$$anonfun$1.apply(Future.scala:127)
        at scala.actors.FutureActor$$anonfun$act$1.apply(Future.scala:93)
        at scala.actors.FutureActor$$anonfun$act$1.apply(Future.scala:93)
        at scala.actors.Reactor$class.seq(Reactor.scala:280)
        at scala.actors.FutureActor.seq(Future.scala:55)
        at scala.actors.Reactor$$anon$3.andThen(Reactor.scala:258)
        at scala.actors.FutureActor.act(Future.scala:94)
        at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222)
        at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222)
        at scala.actors.ReactorTask.run(ReactorTask.scala:33)
        at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinP
ool.java:611)
        at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:
422)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorke
rThread.java:340)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThre
ad.java:325)

oh, now I see

case Op.finddef => error("finddef")
joa commented

Might have been an undocumented op at that time. Will take a look next
week. Currently on holidays.

Sent via mobile.
Am 04.07.2013 02:22 schrieb "Sergey Gonchar" notifications@github.com:

oh, now I see

case Op.finddef => error("finddef")


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-20452996
.

Great, thank you!

joa commented

From tamarin-redux source: finddef has 1 argument which is a U30 and points to a multiname in the cpool.
Here is the implementation of finddef if you care to fix it:

INSTR(finddef) {
  SAVE_EXPC;
  u1 = U30ARG;
  o1 = finddef_cache((ScriptObject**)&(*env->abcEnv()->finddefTable())[(uint32_t)u1],
      &aux_memory->methodFrame);
  *(++sp) = o1->atom();
  NEXT;
}

Looks like the usual optional namespaces for the multiname (in case it is a MutlinameL) which might be on the stack and resulting is the object for whatever finddef returns.

hi guys, hi joa,
i just got in the same error by invoking the code coverage goal in a flexmojos build.
in my case the error is related to a piece of code compiled with flacc from c++,
hope this helps to restrict the scope of what caused this error.
ciao