GNU bug report logs -
#75457
[PATCH guile-zlib] zlib.scm: Fix uncompress for native 32-bit systems.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75457 in the body.
You can then email your comments to 75457 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#75457
; Package
guix-patches
.
(Thu, 09 Jan 2025 10:36:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 09 Jan 2025 10:36:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* zlib.scm (uncompress): Use the sizeof an unsigned-long for all size
calculations instead of forcing 64-bit integers.
---
I tested this (all the tests passed) using the guix.scm in the repo using:
guix build -f guix.scm
guix build -f guix.scm --system=i686-linux
guix build -f guix.scm --system=powerpc-linux (with offloading to an
actual powerpc-linux machine)
zlib.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/zlib.scm b/zlib.scm
index 86ca4fc..a0702dc 100644
--- a/zlib.scm
+++ b/zlib.scm
@@ -425,9 +425,10 @@ require PORT to be a file port."
the uncompressed data."
(define (try-uncompress length)
(let* ((dest (make-bytevector (* (sizeof uint8) length)))
- (dest-length (make-bytevector 8))
- (source-length (make-bytevector 8)))
- (bytevector-u64-set! source-length 0 length (native-endianness))
+ (dest-length (make-bytevector (sizeof unsigned-long)))
+ (source-length (make-bytevector (sizeof unsigned-long))))
+ (bytevector-uint-set! source-length 0 length
+ (native-endianness) (sizeof unsigned-long))
(bytevector-uint-set! dest-length 0 length
(native-endianness) (sizeof unsigned-long))
(let ((result (%uncompress2 (bytevector->pointer dest)
base-commit: cfaf683579a97630040efe4b7596af4bc519b05e
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sat, 18 Jan 2025 17:56:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
bug acknowledged by developer.
(Sat, 18 Jan 2025 17:56:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 75457-done <at> debbugs.gnu.org (full text, mbox):
Efraim Flashner <efraim <at> flashner.co.il> skribis:
> * zlib.scm (uncompress): Use the sizeof an unsigned-long for all size
> calculations instead of forcing 64-bit integers.
Pushed as 7eb66708fb8db750d7175b750531a48e3f49d96d.
Interestingly i686 was fine, probably because it’s little endian so the
bug you had on powerpc didn’t show up.
Let’s see if there’s anything else to fix and if not, we should tag a
new version.
Thanks!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#75457
; Package
guix-patches
.
(Sun, 19 Jan 2025 08:43:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 75457-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, Jan 18, 2025 at 06:55:29PM +0100, Ludovic Courtès wrote:
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
>
> > * zlib.scm (uncompress): Use the sizeof an unsigned-long for all size
> > calculations instead of forcing 64-bit integers.
>
> Pushed as 7eb66708fb8db750d7175b750531a48e3f49d96d.
>
> Interestingly i686 was fine, probably because it’s little endian so the
> bug you had on powerpc didn’t show up.
>
> Let’s see if there’s anything else to fix and if not, we should tag a
> new version.
I had thought that some of the 64-bitness of running on a 64-bit machine
while building as i686 leaked through, but checking debian's build logs¹
for guile-zlib 0.2.1-1 was inconclusive, with powerpc and hppa showing
the same test failure I was hitting. Nothing on m68k, which I think is
big endian, but it looks like the tests weren't run there.
¹ https://buildd.debian.org/status/package.php?p=guile-zlib&suite=sid
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 16 Feb 2025 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.