Bug#1146517: libipc-shareable-perl: FTBFS on ppc64el and ppc64: shm_segments() reads the wrong field of struct shmid_ds
Edmund Lodewijks
edmund at proteamail.com
Wed Sep 2 19:56:25 BST 2026
Source: libipc-shareable-perl
Version: 1.19-1
Severity: serious
Tags: ftbfs patch upstream
Justification: fails to build from source
Forwarded: https://github.com/stevieb9/ipc-shareable/issues/66
X-Debbugs-Cc: gregoa at debian.org
1.19-1 fails to build on ppc64el and ppc64, and builds everywhere else:
https://buildd.debian.org/status/package.php?p=libipc-shareable-perl
https://buildd.debian.org/status/logs.php?pkg=libipc-shareable-perl&arch=ppc64el
t/72-shm_segments.t (Wstat: 6912 Tests: 47 Failed: 27)
t/74-seg_map.t (Wstat: 512 Tests: 12 Failed: 2)
lib/IPC/Shareable.pm unpacks struct shmid_ds at a hard-coded offset for
shm_segsz, assuming the asm-generic field order. PowerPC puts the three
time fields first, so on ppc64el/ppc64 the offset lands on shm_atime;
the oversized value makes the following shmread() fail and the segment
never reaches %segments. IPC/Shareable/SharedMem.pm has the same bug in
stat().
Reported upstream as #66, together with an alternative that drops the
offset tables entirely and reads the fields through IPC::SysV's XS
instead. Upstream has not replied yet, so the attached minimal fix is
what I would suggest for Debian; it is the least likely to conflict with
whichever route upstream takes.
Both solutions were built and tested on ppc64el under sbuild. No
upstream reply yet.
Filed separately from #1142815, which is the unrelated t/47-seg_size.t
memory problem (upstream #65).
Kind regards,
Edmund Lodewijks
--
Edmund Lodewijks <edmund at proteamail.com>
TZ: UTC+2 / GMT+2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: powerpc-shmid_ds-offset.patch
Type: text/x-patch
Size: 1690 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20260902/506adf37/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: powerpc-sharedmem-stat-offsets.patch
Type: text/x-patch
Size: 4200 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20260902/506adf37/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20260902/506adf37/attachment-0001.sig>
More information about the pkg-perl-maintainers
mailing list