From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100013 invoked by alias); 30 Aug 2017 17:00:33 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 99720 invoked by uid 89); 30 Aug 2017 17:00:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=art, tech X-HELO: mail-vk0-f49.google.com Received: from mail-vk0-f49.google.com (HELO mail-vk0-f49.google.com) (209.85.213.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Aug 2017 17:00:26 +0000 Received: by mail-vk0-f49.google.com with SMTP id j7so19157592vke.0 for ; Wed, 30 Aug 2017 10:00:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Tk2Mfj2nnUazQLVMJ513EsgOgABkULxOARWiaalBjKg=; b=crkP0G2dssu0PSuOw9R5Khof4TRxBweI87v7qCjxkYrPsu44sEOxz3GP8ixbqSrtyB JXaMj8aryoNbfNDCG4skEiFdbtbMrVdQnSJs9Rxy5qJBySaNmqvDkg3w8tN2EoSPP+Kl K1MlN/b5r3uh9e0KV0sGJWSpXVR0ccSl/nFDnmBtMgorFUg9Wlcp6q3kBqDl6g/r12uX o2h48xlPfUgBBfBx8RxFatGenyLnPepfYtEQEoiejdHfzoOr2rolQgWqj1G75rOLHzGV 54T0CPHv3dw4EJ1k86c0unsy4EP8eUcN2IcX7gTBVN13sUAMKNPXwz3OK+fm4F5z8FcW r5bg== X-Gm-Message-State: AHYfb5g1yHBhIgROjzSCe7rpiveJTJjuVSzf5+iwnOyvkij7XzPBn+xD kihGxeFUUeIDLSPYclhejMsPy7Ty0g== X-Received: by 10.31.11.11 with SMTP id 11mr1096525vkl.61.1504112421072; Wed, 30 Aug 2017 10:00:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.51.65 with HTTP; Wed, 30 Aug 2017 10:00:20 -0700 (PDT) In-Reply-To: References: From: Kay Zheng Date: Wed, 30 Aug 2017 17:00:00 -0000 Message-ID: Subject: Re: Incompatibility between the Android runtime and Kawa-generated field names To: Per Bothner Cc: Kawa mailing list Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00020.txt.bz2 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 : > 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 : >> 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/