#1146590 tinyarray: FTBFS on arm64

Package:
src:tinyarray
Source:
src:tinyarray
Submitter:
Maximiliano Curia
Date:
2026-10-18 15:51:03 UTC
Severity:
normal
Tags:
#1146590#5
Date:
2026-09-03 15:19:41 UTC
From:
To:
Hi!

While rebuilding the python related packages against the Python 3.15rc1
version we found that tinyarray fails to build from source on arm64 [1].
This also fails on Debian's buildds [2].

It fails in arm64 with: Failed: DID NOT RAISE OverflowError

When converting floats to integer, `std::numeric_limits<long>::max()`
(2^63 - 1) rounds up to 2^63 in float/double, causing `*ptr > max()` to
be false for 2^63. The subsequent check on the cast integer relied on
architecture-specific overflow behavior that does not hold on ARM64
(where out-of-range floats saturate to positive INT64_MAX instead of
negative values).

So, to fix it, check bounds against exact power-of-two limits before
casting to detect  overflow portably across architectures.

I applied the fix in the sandbox [3] to be able to build the packages
that depend on tinyarray, please consider applying the patch to support
the upcoming 3.15 version.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4316397/
[2]: https://buildd.debian.org/status/fetch.php?pkg=tinyarray&arch=arm64&ver=1.2.5-1&stamp=1766523038&raw=0
[3]: https://debusine.debian.net/debian/r-python-python3.15/

#1146590#12
Date:
2026-10-18 10:32:07 UTC
From:
To:
This is already failing in all architectures (and has been failing since
the last upload). So increasing the severity to serious.

#1146590#19
Date:
2026-10-18 15:50:18 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
tinyarray, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1146590@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Margarita Manterola <marga@debian.org> (supplier of updated tinyarray package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 18 Oct 2026 14:09:13 +0200
Source: tinyarray
Architecture: source
Version: 1.2.5-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Margarita Manterola <marga@debian.org>
Closes: 1017051 1146590
Changes:
 tinyarray (1.2.5-2) unstable; urgency=medium
 .
   * Team upload.
   * Add fix-float-to-integer-conversion.patch to fix missing overflow error on
     several non-amd64 architectures (Closes: #1146590).
   * Add fix-32bit-integer-hash.patch to fix wrong hash values for certain
     numbers on 32bit architectures (Closes: #1017051).
   * Add fix-armhf-alignment.patch to solve alignment issuees on armhf and
     possibly other architectures.
   * Update Standards-Version to 4.7.4: drop Priority field from
     debian/control.
Checksums-Sha1:
 6700fbe65619ca18b66afb0c1e6f0673c9650838 2349 tinyarray_1.2.5-2.dsc
 3ed671d06a0cdc0bd82edbea7380ba576959e0d1 38510 tinyarray_1.2.5.orig.tar.gz
 d5808b5c016e8cd867259f04404d98b139cd44b3 833 tinyarray_1.2.5.orig.tar.gz.asc
 43ed5ecb1e4bc130472eb7e2e96a0b94ac4b213a 9920 tinyarray_1.2.5-2.debian.tar.xz
 94e30688882ceda38340ae1acfe4a862c2994c1f 6701 tinyarray_1.2.5-2_source.buildinfo
Checksums-Sha256:
 8e402d770a3645d32de3dc568c703d2d73983ff04bce22f126204db04202bea0 2349 tinyarray_1.2.5-2.dsc
 5d47b3d475a30478ee72d6afe238c3d3683b3a3f9d425bb2f6384270b2c8799b 38510 tinyarray_1.2.5.orig.tar.gz
 4e6b8b9697d113369ad957658a4a2a4f342a3e673bd2e0431ff2bca958c09230 833 tinyarray_1.2.5.orig.tar.gz.asc
 fc827c1f458ad19a3c71ced067cf713e664449e8202194d69db177c19c611c05 9920 tinyarray_1.2.5-2.debian.tar.xz
 9aec62c0522225aa9d28849e016c31d1f69ca80b7eb3f97bf2828554c10c1493 6701 tinyarray_1.2.5-2_source.buildinfo
Files:
 23dcb2cda69ca5849f0652519a901ee4 2349 python optional tinyarray_1.2.5-2.dsc
 06cbd64dd59c764482c1c4eba9994434 38510 python optional tinyarray_1.2.5.orig.tar.gz
 8ca37c5847171984b19ec38ae5d13c31 833 python optional tinyarray_1.2.5.orig.tar.gz.asc
 70b34dc64e40c996568aa88f0ebfd3d6 9920 python optional tinyarray_1.2.5-2.debian.tar.xz
 66aea2c142af182f343a6c140859d3fa 6701 python optional tinyarray_1.2.5-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEAMPhhOivEnEYVt/SgNCkL/LIUMoFAmrU48wRHG1hcmdhQGRl
Ymlhbi5vcmcACgkQgNCkL/LIUMqHwg//fhV3C0/rmxWXnj3hMDRLYWp3rufh7VME
hr61UyWyNLl1q/v8On31/aTt54U/d4A+vnTNph0LXeMxpd3xvFVb98NkM+KYpvbA
Jw99VDk1QWWc3plsPiZBjVbu6QtdKEG/ecNb2fsJnn/dBRShzNAdXy7xvnUrTP6o
y6EN9FVC9AQWNV2IkQw2G3DrE11yGNP0mrMY7SaWUmy/f/Ipa35rvsYtKdu5Rdmy
PONnngrdrz9JQ8HTZ72PpL6YPo9ehPD49/RixyNM2hVHlSnq0AHYIV79J0dy/Fbt
iw4VAE1oDYF+vAMLAsvq/aqiVAxx9JjrUs9f+VtMZsJuYWUScWT0YER1pVu6N6zW
dPNRpfjJ2m8UeN617gxHRs0+sXUr4B+TETJY1/o2lnVtoOylKJ4CSpnkJbCyzbWI
0fO5iHWXm+gXfbHQdATZG1df1SRNcquIGTKw3mzFyUjdfx71fYQg1t+7MOeVE7BR
SoIKXSkngD0P8urfaQ8yaRkj0jhtOyK4De7BmUIhTQPrFxa2AFmM4EBKG4QvKmmi
ioNZYd8Dv4n7WT6aXz6ATDHZN875yQSq9CqbSnvhU5UD5WHzo+xgbMsB/+Lfxwbu
DKaPmZIeH86GUIscUJAwrB+vbOI5zk8bqenoZm/KBnAplVdc36EqiXaZp1eCAxpH
oihC30wiCMc=
=zBCn
-----END PGP SIGNATURE-----