From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SCesFkvKdmDWTgAAgWs5BA (envelope-from ) for ; Wed, 14 Apr 2021 12:56:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wOWtEEvKdmCBJgAAbx9fmQ (envelope-from ) for ; Wed, 14 Apr 2021 10:56:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BF1E4255AF for ; Wed, 14 Apr 2021 12:56:10 +0200 (CEST) Received: from localhost ([::1]:40172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWdBp-0001hq-UN for larch@yhetil.org; Wed, 14 Apr 2021 06:56:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWdBh-0001hY-Vg for bug-guix@gnu.org; Wed, 14 Apr 2021 06:56:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWdBh-0003r7-Kp for bug-guix@gnu.org; Wed, 14 Apr 2021 06:56:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWdBh-0001XX-IU for bug-guix@gnu.org; Wed, 14 Apr 2021 06:56:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#33848: Store references in SBCL-compiled code are "invisible" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 14 Apr 2021 10:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33848 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mark H Weaver Received: via spool by 33848-submit@debbugs.gnu.org id=B33848.16183977555907 (code B ref 33848); Wed, 14 Apr 2021 10:56:01 +0000 Received: (at 33848) by debbugs.gnu.org; 14 Apr 2021 10:55:55 +0000 Received: from localhost ([127.0.0.1]:33692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWdBa-0001XD-Lu for submit@debbugs.gnu.org; Wed, 14 Apr 2021 06:55:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWdBY-0001Wy-Mb for 33848@debbugs.gnu.org; Wed, 14 Apr 2021 06:55:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40213) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWdBS-0003j8-1W; Wed, 14 Apr 2021 06:55:46 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34842 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWdBQ-0005yR-Qr; Wed, 14 Apr 2021 06:55:45 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87r2e8jpfx.fsf@gnu.org> <87k1juaomo.fsf@gnu.org> <87muoqhk62.fsf@ambrevar.xyz> <87zhsq8wkj.fsf@gnu.org> <87d0pmhbgn.fsf@ambrevar.xyz> <87r2e28tkv.fsf@gnu.org> <874laygkiy.fsf@ambrevar.xyz> <87lfa5eymf.fsf@ambrevar.xyz> <87tuoscsk9.fsf@gnu.org> <87im57b8u7.fsf@ambrevar.xyz> <87czvebky2.fsf@netris.org> <87eefu30a4.fsf@gnu.org> <87im56l6es.fsf@yamatai> <87wntm8j18.fsf@ambrevar.xyz> <87a6qil4b1.fsf@yamatai> <87a6qiz5b3.fsf@ambrevar.xyz> <871rbtc3j5.fsf@netris.org> <87r1js9udv.fsf@netris.org> <87h7kj7j7x.fsf@netris.org> <87ft01axta.fsf@gnu.org> <87k0p6rlt5.fsf@netris.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Germinal an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 14 Apr 2021 12:55:43 +0200 In-Reply-To: <87k0p6rlt5.fsf@netris.org> (Mark H. Weaver's message of "Tue, 13 Apr 2021 16:06:19 -0400") Message-ID: <87eefdf840.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre Neidhardt , 33848@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618397770; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=nAme4U8gnBv3ERwzdJB46EUdDAL9nWTqiZHD0+KhNfQ=; b=KhWJ3HxB4azHU3eNyLOLhbFPMpXEu7EfwMz4sou40o7TVAcztYadNmUZwOYMaRff1RI7zz ohc/V9e4mqw5bj8RGJmpH8A2r9K9myN1jErEkp0iDBbI7tBk+bjYMU+sf1NO2btAwD0pRr J6MdqDvFJ49bXu2MA4lEJN2izLwsAdzdB5wDwz52beC+1W+bDT7k9WDSfWpx0He0iy6ZlA 7TyeEmpPe3Qf9HpCnzinZPFpgCcxUVMthkcU2COUs04R0ooJAo5ReVCbgzQ89ICy9BuZB8 SYoI92KlBj9M5cS53XzC9CXZXZHSfqkp0XBNAg02sHkcAdRIhw0dMjGrzH3K4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618397770; a=rsa-sha256; cv=none; b=SLlm072xbnERHk1p6ES7Hz5L45827102Elw8/UnvIFahOp1ZgmPVM2EzhynmKBUiQId+I1 lQE/WBY3QA6rHBPrMYNEQN4L44xjUB7cA01/EwjFc5L/pK6dTpY+URdovZUA5ryCywNyVU Mn5S3tWDbIYd/5oRYmlOGDKky40LGEVNNRTvxZ4H5A0Ij1OClBfUObvEp6Ucvx3OUS9hdy 0BLIfis7aQcLgoRyzCbhZ8dNgDM0RusXbiZB/EzI3a1shaCCMIQlSHl04kRyE9q7sGqqNt 5iExh+h8FbkJ2CKU+m5BS4+t+sWis3h6IQX2v+WG37ychJL3I8GsjchNAva0vg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.94 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: BF1E4255AF X-Spam-Score: -2.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: YFfXaMb6zpPb Hi Mark, Mark H Weaver skribis: >> The risks of bugs I can think of are: missed ASCII references (a >> regression, whereby some ASCII references would not get rewritten), > > This is indeed a risk whenever we modify the grafting code, which is > written for efficiency, not clarity. I've tried to be careful, and have > checked that my newly grafted system and user profiles do not retain > references to ungrafted code, modulo the following pre-existing issues: > > > (ibus-daemon launches ungrafted subprocesses) > > > (Chunked store references in .zo files in Racket 8) OK. >> and unrelated UTF-{16,32}-base32-looking references getting rewritten. >> >> I guess the latter is very unlikely because only sequences found in the >> replacement table may be rewritten, right? > > Yes, that's correct. > >> The former should be caught by =E2=80=98tests/grafts.scm=E2=80=99 but we= could also >> check the closure of real-world systems, for instance, to make sure it >> doesn=E2=80=99t refer to ungrafted things. > > As I mention above, I've already done so for my own GNOME-based Guix > system. Yes, we should be safe. >> Do you know how this affects performance? > > I have not yet measured it, but subjectively, I do not notice any > obvious difference in speed. > > I expect that the main performance impact is that large blocks of NULs > will be processed more slowly by the current draft version of the new > grafting code. That's because NULs can now be part of a nix hash, and > therefore the new grafting code can only advance 1 byte position when > seeing a NUL, whereas previously it would skip ahead 33 positions in > that case. > > If desired, the handling of NULs could be made more efficient, at the > cost of a bit more complexity. When seeing a NUL, we could check the > adjacent bytes to see if this is part of a nix-base32 character in > UTF-16 or UTF-32 encoding. If not, we could skip ahead. Let=E2=80=99s keep it this way for now; we can always revisit later if we f= eel the need for it. >> For clarity, perhaps you can define a top-level procedure for the test >> and call it from =E2=80=98for-each=E2=80=99. > > Good idea. I'd like to optimize the tests a bit before pushing this. > They take a fairly long time to run, and lead to a huge 1.5G grafts.log > file. It might be sufficient to avoid 'test-equal' here. Ah yes, rather use =E2=80=98test-assert=E2=80=99 or some such to avoid the = huge log file. :-) > Below, I've attached my current revision of this draft patch, which > incorporates your suggestions regarding the main code. What remains is > to improve the tests. LGTM! Feel free to push this version or an improved one. I think it=E2=80= =99s good to have it in the upcoming release, and if it=E2=80=99s pushed sooner, we=E2=80=99ll have more time to react in case something=E2=80=99s wrong. Thank you! Ludo=E2=80=99.