GNU bug report logs - #48448
'procedure-name' returns #f if name is #{}# (the empty symbol)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Severity: minor; Reported by: Maxime Devos <maximedevos@HIDDEN>; dated Sat, 15 May 2021 18:28:02 UTC; Maintainer for guile is bug-guile@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Taylan Kammer <taylan.kammer@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 48448 <at> debbugs.gnu.org:


Received: (at 48448) by debbugs.gnu.org; 15 May 2021 23:33:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 15 19:33:26 2021
Received: from localhost ([127.0.0.1]:49402 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1li3mf-0003BU-3a
	for submit <at> debbugs.gnu.org; Sat, 15 May 2021 19:33:26 -0400
Received: from mail-ej1-f44.google.com ([209.85.218.44]:45864)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <taylan.kammer@HIDDEN>) id 1li3mO-0003B2-7K
 for 48448 <at> debbugs.gnu.org; Sat, 15 May 2021 19:33:24 -0400
Received: by mail-ej1-f44.google.com with SMTP id s22so3554843ejv.12
 for <48448 <at> debbugs.gnu.org>; Sat, 15 May 2021 16:33:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=0gJN7wDczvDxE2yCRjyh5Gb48dQAUmwSpy/8O/bb7xY=;
 b=rJLKGHMGZ1GMXi4epDT5mRWu/1xj1ucEQ0854ClmLdO4QzhDVktm3BP5t8FBhAgUIO
 dyxccgf56WSgv9785hWQdK1rqbcDtQFtUT9rXPJia5dC++/ch894jglMOONBMTIx+niK
 Aauiy1uPuDv7lYu97wheyofR9DsCMqeKaHMKtBdDTlrVyjdCp4bhyi3LW7ws7rE2Kmff
 qi+SDpKRwz0BH1QbTfMv5PPaVDQRgAxwmQ2BhU6D5YAV6VMg2ChBPUlHXt47A6G1vYuz
 KezsWJbltg1ukXwdjDsW3nfi7/9ckCm+kwxhOU+q4Kg27m1Mz0IY7EiVO3k9iFPEkQax
 PXVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=0gJN7wDczvDxE2yCRjyh5Gb48dQAUmwSpy/8O/bb7xY=;
 b=CxY1lLrQy9gS8cPXaVeWPO/swmEu9z5KCoOytwggMDVgVa51mXN6i/lzVno/NiUhcz
 AzW3g0DcP59YTR6h5obHLrIOT0Lxgy216oWwYlnhioYsZzU4h+M2lFhe0+VvIjpuOuS6
 DIHmjZS0H6fdi2yMVm6R0Hl+Q9s/2sdnqO9KlOzDTpOfJ4ZZ0c2svF9vSKlVu938w4fz
 Y8bCObxBoj9uXOFLpgEaqmnNp6gK7lCq9QG+jxZItrzVYkuyTRyUrsvE5iB4S4FKkIOq
 QuTdgd57ROSxOVmxhdlidvnmgJ/URMBcYMO4eNJinrmcUqX0eEp1B+anJm+M5rBEIJOQ
 Kvcg==
X-Gm-Message-State: AOAM532Tp6jQllQjw4gAB582dhKOMkaA5FuOILLbnVAn+MnBkFLJmyLT
 4HIerb2WjpgU0CBHTUX0JCax6JbQoHoOiA==
X-Google-Smtp-Source: ABdhPJypWN1UP//7jfS5fVV2DW+SEGOjv8aNDyk16JfyMDmk0f3WMb3AzeKX52auyYoe3x+rFbOsAA==
X-Received: by 2002:a17:906:e105:: with SMTP id
 gj5mr56299291ejb.388.1621121582407; 
 Sat, 15 May 2021 16:33:02 -0700 (PDT)
Received: from [192.168.178.20] (b2b-109-90-125-150.unitymedia.biz.
 [109.90.125.150])
 by smtp.gmail.com with ESMTPSA id cf19sm6087977ejb.24.2021.05.15.16.33.01
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 15 May 2021 16:33:02 -0700 (PDT)
Subject: bug#48448: 'procedure-name' returns #f if name is #{}# (the empty
 symbol)
To: Maxime Devos <maximedevos@HIDDEN>, 48448 <at> debbugs.gnu.org
References: <1b56d817814d4d1fa08e70578d4aebac909b0aff.camel@HIDDEN>
From: Taylan Kammer <taylan.kammer@HIDDEN>
Message-ID: <1ee0f4ed-5b13-854e-f95c-66bf11cc33d9@HIDDEN>
Date: Sun, 16 May 2021 01:33:00 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.10.1
MIME-Version: 1.0
In-Reply-To: <1b56d817814d4d1fa08e70578d4aebac909b0aff.camel@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48448
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 15.05.2021 20:27, Maxime Devos wrote:
> guile --version: 3.0.5
> In a REPL:
> 
> (let ((#{}# (lambda () 0)) (something-else (lambda () 0)))
>   (map procedure-name (list #{}# something-else)))
> --> $20 (#f someting-else)
> 

The problem seems to be that once the compiler produces bytecode,
there is no distinction anymore between a missing name and a name
that is the empty string.

See the procedure link-symtab in module/system/vm/assembler.scm
line 2345.  For every piece of metadata (this includes the names
of procedures), it puts it into the string table, and conflates
a missing name (name = #f) with the empty string:

  (string-table-intern! strtab (if name (symbol->string name) ""))

I'm guessing that changing this would not be worth the effort,
although this isn't my area of expertise.  (I spent more than an
hour trying to figure out the source of the issue, though it was
a great learning experience.)

One could even argue that if you name a procedure after the empty
string... it has no name, right? ;-)

I'm marking this as a minor bug.

--
Taylan




Information forwarded to bug-guile@HIDDEN:
bug#48448; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 May 2021 18:27:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 15 14:27:48 2021
Received: from localhost ([127.0.0.1]:49219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lhz0t-0003oQ-UT
	for submit <at> debbugs.gnu.org; Sat, 15 May 2021 14:27:48 -0400
Received: from lists.gnu.org ([209.51.188.17]:33708)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1lhz0s-0003oI-FQ
 for submit <at> debbugs.gnu.org; Sat, 15 May 2021 14:27:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56250)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maximedevos@HIDDEN>)
 id 1lhz0r-0000il-Gq
 for bug-guile@HIDDEN; Sat, 15 May 2021 14:27:45 -0400
Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:46046)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maximedevos@HIDDEN>)
 id 1lhz0n-0003SZ-Cg
 for bug-guile@HIDDEN; Sat, 15 May 2021 14:27:45 -0400
Received: from butterfly ([188.188.255.22])
 by albert.telenet-ops.be with bizsmtp
 id 56Tb250020VmNz8066Tbd5; Sat, 15 May 2021 20:27:35 +0200
Message-ID: <1b56d817814d4d1fa08e70578d4aebac909b0aff.camel@HIDDEN>
Subject: 'procedure-name' returns #f if name is #{}# (the empty symbol)
From: Maxime Devos <maximedevos@HIDDEN>
To: bug-guile@HIDDEN
Date: Sat, 15 May 2021 20:27:27 +0200
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-3RAO43t9s1IhYgGbQFLN"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1621103255; bh=rfyoFXYEclfdw+v/REXoJLxnpigoXdvuQOxdjJossk8=;
 h=Subject:From:To:Date;
 b=Dfb3GQiebn89T7nAid6qRxYTSJN6IdljbWtHVujhujLtbSpgxhy6S2987BqZvJYKl
 T5w4mG+WQKKyerKUoutHIqNecAIVmfmU3Ab0gllEghsbORGF9nPSNnCbZlTkPwOiXn
 5LPuEcVbRmvnVqWoaIQvNQQrn+/OTIozJLTw66RO8tiYXJrwbXHFx9STRZzo9Uh7YI
 VnZpR1MDoTQD7M5DDPtMjoeIKXAjYamtXcitaxKpWBwmKmONfAedkfxzq3iUXA1V1v
 /pmSw2iqnqbn1daqNiNqtQr5AyRDJY7v7BQ/8zqILMKMga8aoPRTODQz5uIQO/ReCQ
 tbe488zLx0kGg==
Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a;
 envelope-from=maximedevos@HIDDEN; helo=albert.telenet-ops.be
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


--=-3RAO43t9s1IhYgGbQFLN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

guile --version: 3.0.5
In a REPL:

(let ((#{}# (lambda () 0)) (something-else (lambda () 0)))
  (map procedure-name (list #{}# something-else)))
--> $20 (#f someting-else)


--=-3RAO43t9s1IhYgGbQFLN
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYKASjxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lNAAQDwI9AaKO5VeRZoGcUy4Jm4ia1G
nWdiJ+61rrJsCKo4GQD+PzbtXViguwTsynO/QN5AK9NmHcK0FismAa6QOSGulgg=
=Cuph
-----END PGP SIGNATURE-----

--=-3RAO43t9s1IhYgGbQFLN--





Acknowledgement sent to Maxime Devos <maximedevos@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#48448; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 15 May 2021 23:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.