public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Kay Zheng <l04m33@gmail.com>
Cc: Kawa mailing list <kawa@sourceware.org>
Subject: Re: "Uncaught translation error" when transforming Kawa-compiled classes with dex
Date: Tue, 29 Aug 2017 20:31:00 -0000	[thread overview]
Message-ID: <2581b42d-a431-badb-bed4-dd44631ae4bb@bothner.com> (raw)
In-Reply-To: <CAJCc8OzekbL4nCZ079=pJw4Bu2qXzd8nD=az71937GSVunuFCA@mail.gmail.com>

On 08/29/2017 01:13 PM, Kay Zheng wrote:

> Uncaught translation error:
> com.android.dx.cf.code.SimException: local variable type mismatch:
> attempt to set or access a value of type int using a local variable of
> ty$
> e gnu.mapping.CallContext. This is symptomatic of .class
> transformation tools that ignore local variable information.
>          at com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:575)
>          at com.android.dx.cf.code.Simulator$SimVisitor.visitLocal(Simulator.java:584)
>          at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:458)
>          at com.android.dx.cf.code.Simulator.simulate(Simulator.java:94)
>          at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:787)
>          at com.android.dx.cf.code.Ropper.doit(Ropper.java:742)
>          at com.android.dx.cf.code.Ropper.convert(Ropper.java:349)
>          at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:285)
>          at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:141)
>          at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:95)
>          at com.android.dx.command.dexer.Main.translateClass(Main.java:799)
>          at com.android.dx.command.dexer.Main.access$2800(Main.java:88)
>          at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1863)
>          at com.android.dx.command.dexer.Main$ClassTranslatorTask.call(Main.java:1848)
>          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>          at java.lang.Thread.run(Thread.java:748)
> ...
> ...while working on method
> stringConcatenateReverse$SlShared$V:(Ljava/lang/Object;Lgnu/lists/LList;)Ljava/lang/Object;
> ...while processing stringConcatenateReverse$SlShared$V
> (Ljava/lang/Object;Lgnu/lists/LList;)Ljava/lang/Object;

I do see a problem.  The method stringConcatenateReverse$SlShared$V in srfi13.class has
the following:

Attribute "LocalVariableTable", length:92, count: 9
   slot#0: name: string-list, type: java.lang.Object (pc: 0 length: 662)
   slot#1: name: maybe-final+end, type: gnu.lists.LList (pc: 0 length: 662)
   slot#2: name: final, type: java.lang.Object (pc: 23 length: 639)
   slot#3: name: end, type: java.lang.Object (pc: 124 length: 538)
   slot#4: name: len, type: java.lang.Object (pc: 300 length: 247)
   slot#5: name: nzlist, type: java.lang.Object (pc: 300 length: 247)
   slot#6: name: lis, type: java.lang.Object (pc: 300 length: 247)
   slot#7: name: $ctx, type: gnu.mapping.CallContext (pc: 300 length: 247)
   slot#7: name: slen, type: int (pc: 340 length: 67)

Notice slot 7 is used for two different variables, of different types - and their
PC ranges overlap.  Hm.

-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2017-08-29 20:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 17:10 Kay Zheng
2017-08-29 17:13 ` Sonny To
2017-08-29 17:31   ` Kay Zheng
2017-08-29 18:02 ` Per Bothner
2017-08-29 20:13   ` Kay Zheng
2017-08-29 20:31     ` Per Bothner [this message]
2017-08-30  0:39       ` Per Bothner
     [not found]         ` <CAJCc8OyZ-D4=zB-u6=V108F+=_ZauWw56L2ZzZBvVy8u67qVaQ@mail.gmail.com>
2017-08-30  5:34           ` Kay Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2581b42d-a431-badb-bed4-dd44631ae4bb@bothner.com \
    --to=per@bothner.com \
    --cc=kawa@sourceware.org \
    --cc=l04m33@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).