public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Kay Zheng <l04m33@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: Kawa mailing list <kawa@sourceware.org>
Subject: Re: Incompatibility between the Android runtime and Kawa-generated field names
Date: Wed, 30 Aug 2017 17:00:00 -0000	[thread overview]
Message-ID: <CAJCc8Ox_YEZ+7ycxUWfQFSdNE0sbCBvEH66rr8Zw_FRqBgOyPA@mail.gmail.com> (raw)
In-Reply-To: <CAJCc8Oy3U_uyjrhHu6hc=L20w3Db_ftYuMRyTSXpt3LDVQ-YfA@mail.gmail.com>

Does the old "mangling" code still exist somewhere? Could you point it
out for me, to see if I can do something with it?

2017-08-31 0:41 GMT+08:00 Kay Zheng <l04m33@gmail.com>:
> Unfortunately, the verification of the names seems to occur only when
> installing an app, and I don't have access to an Android 8 device, nor
> can I run an emulator at the moment.
>
> But I did come across the official naming specification for dex files though:
>
>     https://source.android.com/devices/tech/dalvik/dex-format#membername
>
> According to the documentation, the limitation still applies.
>
> 2017-08-31 0:24 GMT+08:00 Per Bothner <per@bothner.com>:
>> On 08/30/2017 09:10 AM, Kay Zheng wrote:
>>>
>>>      08-30 17:57:28.998 15990 15990 W art     : Failure to verify dex
>>> file '/data/app/com.theerrorlog.superbapp-1/base.apk': Invalid field
>>> name: '1+'
>>>
>>> It turned out that some class files in Kawa's standard library
>>> contained fields with exotic names such as '1+', '1-',
>>> '%provide%srfi-41', which seemed to be legal JVM names, but treated as
>>> illegal by the ART.
>>
>>
>> Could you check if this limitation has been fixed in the latest Android?
>> If so, we could select the old "mangling" style based on a #ifdef JAVA8
>> pre-processor directive.
>>
>>> And I noticed that the 2.4 branch used a different naming scheme that
>>> "translates" these exotic names into names with "escape sequences".
>>> For example '1+' will be renamed to '$N1$Pl', making the translated
>>> names all legal ART names too.
>>>
>>> So what's the reason for abandoning the "escaping" naming scheme? Can
>>> I remedy the incompatibility issue in some way?
>>
>>
>> One reason for avoiding needless escaping is to have more readable stack
>> traces.
>>
>> Another is the new escape scheme (which escapes many fewer characters)
>> appears to be somewhat standard, and used by other languages:
>> ttps://blogs.oracle.com/jrose/entry/symbolic_freedom_in_the_vm
>> That means it is more like to be supported by tools such as IDEs.
>> --
>>         --Per Bothner
>> per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2017-08-30 17:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 16:10 Kay Zheng
2017-08-30 16:24 ` Per Bothner
2017-08-30 16:42   ` Kay Zheng
2017-08-30 17:00     ` Kay Zheng [this message]
2017-08-30 17:04       ` Per Bothner
2017-08-30 17:10         ` Kay Zheng
2017-08-31 15:39         ` Per Bothner
2017-09-01  4:15           ` 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=CAJCc8Ox_YEZ+7ycxUWfQFSdNE0sbCBvEH66rr8Zw_FRqBgOyPA@mail.gmail.com \
    --to=l04m33@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.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).