Package: wget2
Version: 2.1.0-4
Severity: important
Tags: upstream ftbfs sid trixie
Control: block 1086111 by -1
Control: forwarded -1 https://gitlab.com/gnuwget/wget2/-/issues/684
X-Debbugs-CC: Andreas Tille <ti...@debian.org>, Paul Gevers <elb...@debian.org>

Dear maintainers,

currently, two tests from wget2's test suite (test-wget-1 and test-timestamping) may fail on 32-bit architectures due to a bug in the setup of wget2's option parser. This might lead to misaligned memory access as can be seen in the armhf build log [1] at least:

options.c:359:28: runtime error: store to misaligned address 0x00c1d26c for 
type 'long long int', which requires 8 byte alignment
0x00c1d26c: note: pointer points here
  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 
00 00 00 00 00 00 00
              ^
Unexpected error code 1, expected 0 [--chunk-size=3]

I have tracked down the bug to a bad typecast from '(size_t *) &config.chunk_size' to '(long long *)'. While both 'long long' and 'size_t' have 64 bits on 64-bit architectures, their memory size differ on 32-bit architectures: 'long long' still has 64 bits but 'size_t' has only 32 bits.

As there is more than one way to fix it, I have opened a ticket upstream to let the authors know about it and to discuss their preferences on how to fix it.

Best regards,

Thomas Uhle


[1] 
https://buildd.debian.org/status/fetch.php?pkg=wget2&arch=armhf&ver=2.1.0-4&stamp=1727628282

Reply via email to