program-file silently corrupts expressions with non-ascii characters

  • Open
  • quality assurance status badge
Details
2 participants
  • Tomas Volf
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
T
T
Tomas Volf wrote on 27 Oct 2023 20:56
(address . bug-guix@gnu.org)
ZTwH8tvZaM835JM8@ws
Hello,

when trying to create an executable script using `program-file', I realized it
silently corrupts expressions with non-ascii characters. Minimal reproduction I
did put together is:

scheme@(guix-user)> ,use (guix)
scheme@(guix-user)> ,build (program-file "foo" '(λ))
$1 = "/gnu/store/im07w0ilskfycpkwid3n7s80hdv263cn-foo"
scheme@(guix-user)> (call-with-input-file $1 read)
;;; <stdin>:3:22: warning: possibly unbound variable `$1'
$2 = (?)

Notice that $2 is (?) instead of the expected (λ). If there is a technical
reason why this cannot be handled correctly, it would be great if it at least
failed with an error instead of a silent corruption.

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmU8B/IACgkQL7/ufbZ/
wandtw//dZIaJF38f9fRD4sRWYESYJxF63f21rIooqfN9Jj5pnuDNBXVHdCaUvqr
dfJN5CvqJxp/vSoEpL67CNgogJ2C4FdyvfZ06OhTgMsKpC3YppisEtaQin2laUVB
9jE+gjoHhP/MogK/ijY+y3OEq7hbYbOB3G4zGA9G/mOSC2zdLCa1JK5nR3Xk61vv
D55361krDtzqWZIBhXCko3fSYjzdT1uFeUCM+sPmiDQ/T2gJUJIULUVI3c7CoNIb
Ttj+E0bqAzKAmroe8rnSx5PW6memBs7KlaLKw8GCPVF16PYV9evhnApP9+UmjoLZ
oKS8d4lAPuq9bk5UpFpE/wkdwVNs0m3JlijOOETZfKqxbjBBJm6JPXfFlprMJMhh
Q6Lu89RyGUckre/foRerrUJl3hQRqcQ9RCoDRMj1kLkdpGOfP2yoYGL3jOgIHAtp
843rkAGCHQ/Rwia50aJxNtZFuIZ6plNEYz1O2Mfqux/sruIKmqp9WqZGWiR4dhKv
9zoRrwpurPVd7mtgKfU8coS2TJyEOr+CTME9Ay4kzH5EKEh9rWi4Il6jcdFgmMmI
sdLjmSqqQo87O6O8cVgcdsEDfMD+xK/ujY/lY4MfeqWMt/xAZPthJaGqRMJKppYh
sEw12bnyOO4OO2djyFe0K2ALTNcU9qgUt28EKTH0ILqIqtNMrwI=
=BEfE
-----END PGP SIGNATURE-----


T
T
Tomas Volf wrote on 9 Jan 17:09 +0100
control message for bug #66777
(address . control@debbugs.gnu.org)
874jfmzdxv.fsf@wolfsden.cz
submitter 66777 !
quit
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 66777@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 66777
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch