GNU bug report logs -
#31923
FAIL: t0501-duplicate on Alpine Linux s390x
Previous Next
To reply to this bug, email your comments to 31923 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-parted <at> gnu.org
:
bug#31923
; Package
parted
.
(Thu, 21 Jun 2018 08:19:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Natanael Copa <ncopa <at> alpinelinux.org>
:
New bug report received and forwarded. Copy sent to
bug-parted <at> gnu.org
.
(Thu, 21 Jun 2018 08:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
It seems that the tests/duplicate segfaults on Alpine Linux s390x when
called as:
./duplicate bsd
+ duplicate bsd
./t0501-duplicate.sh: line 21: 3803 Segmentation fault duplicate
I have attached the test-suite.log.
Backtrace:
Core was generated by `/home/ncopa/aports/main/parted/src/parted-3.2/tests/.libs/lt-duplicate bsd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000003ff8ad23f32 in xbsd_dkcksum (lp=0x3ff8ac54c80) at bsd.c:134
134 sum ^= *start++;
(gdb) bt
#0 0x000003ff8ad23f32 in xbsd_dkcksum (lp=0x3ff8ac54c80) at bsd.c:134
#1 bsd_write (disk=0x3ff8ac54ac0) at bsd.c:368
#2 0x000003ff8ad12afe in ped_disk_commit_to_dev (disk=0x3ff8ac54ac0) at disk.c:500
#3 0x000003ff8ad12b66 in ped_disk_commit (disk=0x3ff8ac54ac0) at disk.c:529
#4 0x000002aa275814a4 in main (argc=<optimized out>, argv=<optimized out>) at duplicate.c:39
A wild guess is that xbsd_dkcksum does not work properly on big endian
machines.
[test-suite.log (text/x-log, attachment)]
Information forwarded
to
bug-parted <at> gnu.org
:
bug#31923
; Package
parted
.
(Thu, 21 Jun 2018 13:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 31923 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 6/21/2018 4:17 AM, Natanael Copa wrote:
> A wild guess is that xbsd_dkcksum does not work properly on big endian
> machines.
It looks like it handles endianess correctly, but I did notice that it
is using something called "u_short" instead of uint16_t. I wonder if on
your machine "u_short" isn't 16 bits? Try changing it to uint16_t.
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-parted <at> gnu.org
:
bug#31923
; Package
parted
.
(Mon, 05 Aug 2019 05:56:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31923 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
found 31923 3.2
We've hit this on Adélie Linux on ppc64. This actually is an endianness
bug.
The attached patch fixes the bug and allows it to pass the test suite
and correctly create a new BSD disk label on big endian computers.
If this patch is acceptable, I can create it in Git format. Or you can
yourself, my Author line should be:
Author: A. Wilcox <AWilcox <at> Wilcox-Tech.com>
Best,
--arw
--
A. Wilcox (awilfox)
Project Lead, Adélie Linux
https://www.adelielinux.org
[bsd-endian.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-parted <at> gnu.org
:
bug#31923
; Package
parted
.
(Mon, 05 Aug 2019 16:04:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 31923 <at> debbugs.gnu.org (full text, mbox):
On Mon, Aug 05, 2019 at 12:55:08AM -0500, A. Wilcox wrote:
> found 31923 3.2
>
> We've hit this on Adélie Linux on ppc64. This actually is an endianness
> bug.
>
> The attached patch fixes the bug and allows it to pass the test suite
> and correctly create a new BSD disk label on big endian computers.
>
> If this patch is acceptable, I can create it in Git format. Or you can
> yourself, my Author line should be:
>
> Author: A. Wilcox <AWilcox <at> Wilcox-Tech.com>
>
>
> Best,
> --arw
>
> --
> A. Wilcox (awilfox)
> Project Lead, Adélie Linux
> https://www.adelielinux.org
> See-Also: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31923
>
> --- parted-3.2/libparted/labels/bsd.c.old 2014-06-15 18:17:43.000000000 +0000
> +++ parted-3.2/libparted/labels/bsd.c 2019-08-05 05:48:52.914401379 +0000
> @@ -364,7 +364,7 @@
> max_part = i;
> }
>
> - label->d_npartitions = PED_CPU_TO_LE16 (max_part) + 1;
> + label->d_npartitions = PED_CPU_TO_LE16 (max_part + 1);
> label->d_checksum = xbsd_dkcksum (label);
>
> alpha_bootblock_checksum (bsd_specific->boot_code);
Ack, thanks!
--
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted
This bug report was last modified 5 years and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.