Skip to content

Commit

Permalink
GMP: Gracefully handle more overflows. (#51243)
Browse files Browse the repository at this point in the history
Fixes #8286, which regressed
due to a GMP upgrade in #45375.

(cherry picked from commit 1097481)
  • Loading branch information
maleadt authored and nalimilan committed Nov 5, 2023
1 parent 8fb6542 commit 71d6798
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 60 deletions.
116 changes: 58 additions & 58 deletions deps/checksums/gmp
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
GMP.v6.2.1+5.aarch64-apple-darwin.tar.gz/md5/56a01b4c21e4bc3ef3014f162c78e0a7
GMP.v6.2.1+5.aarch64-apple-darwin.tar.gz/sha512/4c0e31f03965602b811be25847b94e227c63f66a152225477468303a44dd0f148970aaaf00e9cf800ba7df602b31b75f64c28e509362bf82b9c9f341b044a20d
GMP.v6.2.1+5.aarch64-linux-gnu-cxx03.tar.gz/md5/a1beafc662eaf934dfb3cec74ea8fe6b
GMP.v6.2.1+5.aarch64-linux-gnu-cxx03.tar.gz/sha512/370de52ddaa4e744bb6cc8eb61bc369e4e96dccdff6b1a65f21d30d4a19d0dbe41c068c8867c0fcd2bffee9aaf375c60050263dcf7c10b215b290253a7654c71
GMP.v6.2.1+5.aarch64-linux-gnu-cxx11.tar.gz/md5/afaca916697bcdac17f4dba7444cd467
GMP.v6.2.1+5.aarch64-linux-gnu-cxx11.tar.gz/sha512/cd7bf7c502e927a05ecde303733240c0245b239447ed4c8c3d13a52b42e47cde48264726321ff318ad6f8c08e8cf4e0c85ac875dade355720fbd7e8b33392092
GMP.v6.2.1+5.aarch64-linux-musl-cxx03.tar.gz/md5/1d7b2be36a999f2b991abae4b9a350c9
GMP.v6.2.1+5.aarch64-linux-musl-cxx03.tar.gz/sha512/6e4f04980a2d326a2ec2ba9b52cb4143fc227459c936706cac9f19c67607019927dc8d9f4822a73c885eb3ab2c37c6af806bff50e1e76d546274979d2589e140
GMP.v6.2.1+5.aarch64-linux-musl-cxx11.tar.gz/md5/d114c9a351854c62b4f4724302a61677
GMP.v6.2.1+5.aarch64-linux-musl-cxx11.tar.gz/sha512/1a0d4e3ef9fd4e2bf17cf0d90b262c1cd4f684e1ed31b6e040afe59cc13ec3dc3ce274f55c62c19217bffdd847850fe55a607f616422e2c31d92d7553100ee98
GMP.v6.2.1+5.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/3e5989fb44bc6e2cb4054e885e931cc6
GMP.v6.2.1+5.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/b42884d9a8d9a7a63f51f602c3cc1c2b80a6fd4aaaa47eebcf89a42443b25ba9691da844d2ac69a46b4099a5bdb34c8089f4efd8ca213d6d9866c2076d1fe061
GMP.v6.2.1+5.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/c65ae9faa092285cc4082bfd585e7b03
GMP.v6.2.1+5.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/74ab5afd05de93315d3e2b7f2ee6b86a2dbc165621e98cbc08b9c61146d595189b641f2bb8af4cd17d868325fa2a193b9f350e0ed457ca8bc9b96bdfb72c51e6
GMP.v6.2.1+5.armv6l-linux-musleabihf-cxx03.tar.gz/md5/cc8e27fc3ec1c1f9e044c9d918d8cfb6
GMP.v6.2.1+5.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/59ae96ed0571ce64a44798767c389f4822222d9519422b5050d22ada68d57371583d4de82c6d22d9636aa2e25cfd9528151364fbf207fdb391bc61d4ad3265e1
GMP.v6.2.1+5.armv6l-linux-musleabihf-cxx11.tar.gz/md5/e5eb9e0084bf9b4b28c7d1060893159f
GMP.v6.2.1+5.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/3befcb4638d29e4d05ba1bc438e5f861a69385f5a3aa2a331194bed8f7f69331ebc61577dadec97a7c2c42e53a6dd240e30c19d4854af0670b98b02f11afc35d
GMP.v6.2.1+5.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a3feda2d30469e8980f7c1d1694f2a65
GMP.v6.2.1+5.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/d6787b7beca9c98e1e8771842052e5f332dc4d34a1d53968704cc54056477072a7cf0c87ae4c9a51ea35c4b4de14cad6f67579469bb802e50eb6d49d65bd0540
GMP.v6.2.1+5.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/989a83feae172a0f01670d89065ac58c
GMP.v6.2.1+5.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/331a08346f8fd7d70a3cd40b1f9c6e7790751cadc9f3027bb1a815314c2e54bae5268a2ecca53a1a5086366641ef7389cb9574cd5f0431dee70ddedff7870b6c
GMP.v6.2.1+5.armv7l-linux-musleabihf-cxx03.tar.gz/md5/705e406788adacc5d73746306215e412
GMP.v6.2.1+5.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/32fa29cb8abcb823cc1e170c4e1ea09b1f970207279c88ac78df352bb3969590e50fc9eb6446d9c5044f5fae2168878614b189cb1cc612ae8b8afe820b83778a
GMP.v6.2.1+5.armv7l-linux-musleabihf-cxx11.tar.gz/md5/2fff6e51075ce3b64c7684451d3a057c
GMP.v6.2.1+5.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/266036a380e3e58e799f1f03129321345a0c4d9db60b88d12166c7c6d817279239aa2e2cbf2442435e12bba8cef18c48fe9844d0b88f0026be67378e18f135c2
GMP.v6.2.1+5.i686-linux-gnu-cxx03.tar.gz/md5/7f07924e4a691436727621e2fd1ff349
GMP.v6.2.1+5.i686-linux-gnu-cxx03.tar.gz/sha512/3e33534fd8ba681c9e4dddd0dbb1c287b1fcb284a55ae13ac685b73d79036fb9de39443e4fbba9f7d3e804ad85c6128ce2e138f92e19df17cda51297089be300
GMP.v6.2.1+5.i686-linux-gnu-cxx11.tar.gz/md5/5882ef18722ca8ea83fc64796ac9a6fc
GMP.v6.2.1+5.i686-linux-gnu-cxx11.tar.gz/sha512/45a25dc59060640accbb9d09574f769da05c448891a7e00b608ec3349c3d05b41710c49cd7d7fa4c5101adc9db1625ff19082715d1a9296e9da957520cca8e9e
GMP.v6.2.1+5.i686-linux-musl-cxx03.tar.gz/md5/dbf0e6f7b74e48ff63e136b4703a92df
GMP.v6.2.1+5.i686-linux-musl-cxx03.tar.gz/sha512/69321bd73da7271147f6cb073c9c8e853ab5b6b84d2cf196df197121a6fe0f6c1c64839bfd1106bba7e547b02f9dd32be9603d76be270e1e22854c600141e80f
GMP.v6.2.1+5.i686-linux-musl-cxx11.tar.gz/md5/94204c12eba64544f58a3dc0b8afc43e
GMP.v6.2.1+5.i686-linux-musl-cxx11.tar.gz/sha512/734b529a24b85eca85b3a95a3df9673a5aa51e2c61456557d273c122870018b574b09a678263c122bcef706c47dc69b142aeb688ccdcd39761eb8ca45e635a3f
GMP.v6.2.1+5.i686-w64-mingw32-cxx03.tar.gz/md5/327155a11581b319a58e780eb97628ad
GMP.v6.2.1+5.i686-w64-mingw32-cxx03.tar.gz/sha512/32c6eaaa3e2d6cc354d7c8cd8cd3b348d560d818f8af0fe8d738b8476e811d38c0d85d4dad9433ce9915322ce2c7634480340c0aace987eebeffd692f4a325d0
GMP.v6.2.1+5.i686-w64-mingw32-cxx11.tar.gz/md5/d7ae966f2ffef8abfb731579c4ef5fb0
GMP.v6.2.1+5.i686-w64-mingw32-cxx11.tar.gz/sha512/ebf234e3dd983d49f68ea2322d2658f9cad53de4ec94a0db33f47860331991ca765ec86a646242fdbbeb36051a182767de75ad47e7808bcbac32b196cbc538b3
GMP.v6.2.1+5.powerpc64le-linux-gnu-cxx03.tar.gz/md5/96bab6f8a36d110065cbe06d8fa654ef
GMP.v6.2.1+5.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d5472ea1a16ec2312e96b85cba9209eb543abca1b07c48fd7a31c42892fe4a9a2368edbb2f2410580a9ff3337a6b9dbb6cad377fc2ffa66746d4a25fb2da4d46
GMP.v6.2.1+5.powerpc64le-linux-gnu-cxx11.tar.gz/md5/41704d02be36f94086f8e79124c15410
GMP.v6.2.1+5.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/dc1800a7e796b4e5dea7c7136545a3120b619f25e28b3aa7e2478dc27d4224160bfc0e03875c4fdd6703c854a8851b27b0f23fd2f5470450230bfb33e337a420
GMP.v6.2.1+5.x86_64-apple-darwin.tar.gz/md5/ec93617dd921d13eeccf946aeda3bdab
GMP.v6.2.1+5.x86_64-apple-darwin.tar.gz/sha512/a1c490e969d2d747d81016381bbabd6c07915ceca456e4fa77f0bb473193fa013dc185ae4b8bb8bd3451a25d9779f90039ac362d8c911fc307928af22e79a50c
GMP.v6.2.1+5.x86_64-linux-gnu-cxx03.tar.gz/md5/899dadfaaf4cd1d787ac6a905c108a02
GMP.v6.2.1+5.x86_64-linux-gnu-cxx03.tar.gz/sha512/d304e85f17503a8e9472b69e908f04c6c3e8e3a88f3692f86c0e1e8d5576620b9b144e2224111a7e6f0eb5a58c6f1cb536803764fc8be13a8ef3147f3bbf779a
GMP.v6.2.1+5.x86_64-linux-gnu-cxx11.tar.gz/md5/ece1ecee696e47609ab06b6463f3ede2
GMP.v6.2.1+5.x86_64-linux-gnu-cxx11.tar.gz/sha512/7fee1caf74f01d2ac9538642901f969f1715ce84199dccd17e016fdeab22fa5dc7a6865e1b5ebf7f54b287d51f7eb48eba4a0b7eb80b8fc4485e49198b914531
GMP.v6.2.1+5.x86_64-linux-musl-cxx03.tar.gz/md5/aff0fb74a84d0867f2692bf61787bfd1
GMP.v6.2.1+5.x86_64-linux-musl-cxx03.tar.gz/sha512/057d552a433f0f4e8d1f5cc1c3f1125f5096a7de72ce41ecb1ab2b7e378e0e39f323a4c50f8875c8ba1a5b66541b83e0841fe60f0ece168aeb3a9b63d3eac68f
GMP.v6.2.1+5.x86_64-linux-musl-cxx11.tar.gz/md5/89f6a22a065acbb2366076b271949141
GMP.v6.2.1+5.x86_64-linux-musl-cxx11.tar.gz/sha512/93cdb3b1ccfbc7c0aca1f9497022d2ea69a023142d59144853300f02b5a25a8f6eacb5da68ff6dc6e969bc315d14386c75aedb828670e96fe84ccb83591bbde4
GMP.v6.2.1+5.x86_64-unknown-freebsd.tar.gz/md5/285707b8dedcee127959bde79d6ad622
GMP.v6.2.1+5.x86_64-unknown-freebsd.tar.gz/sha512/77d70f2b29d0bc1fd6c2d938db5b1883697b181d05491931c53eb6d23d84560743fb069ed3b8b9374fdf7d3c37b1f8f732d038e133e38fd3f42a8182ef50fc20
GMP.v6.2.1+5.x86_64-w64-mingw32-cxx03.tar.gz/md5/fe8257f44266f6741eca3ff288048725
GMP.v6.2.1+5.x86_64-w64-mingw32-cxx03.tar.gz/sha512/225bf51c55de35cf81e36d848e2fae2646722ceea2e72d66d6d476422df2f5960819db4f3d8a89428fe4d865a657ee4313398109f6fe688971d151cbcd69a279
GMP.v6.2.1+5.x86_64-w64-mingw32-cxx11.tar.gz/md5/cfb3c9a7a015a271f50dd2a55b55297e
GMP.v6.2.1+5.x86_64-w64-mingw32-cxx11.tar.gz/sha512/a8b6587d9e6a8964d1ff914402b48a6f8ad52cbca96ba5bf732e4e232bf0c942d535926e755983c5e4cc4aa90b473edeac44742ef498963d1276f1ff3c49fa98
GMP.v6.2.1+6.aarch64-apple-darwin.tar.gz/md5/8123f7925ae9aa60b6998313b21a9db9
GMP.v6.2.1+6.aarch64-apple-darwin.tar.gz/sha512/5c7927ecfd47409dd4116cd4209768294ba229b51472ed220da498823dc1e7f9100292ec4b3a990491acd27f16ce3a3dce7a7c6e20dcd515982a9c8e364d91bc
GMP.v6.2.1+6.aarch64-linux-gnu-cxx03.tar.gz/md5/0d0d2ee67cff251941e3474341280b34
GMP.v6.2.1+6.aarch64-linux-gnu-cxx03.tar.gz/sha512/69fb2f1476e0bb73f89ad2f73b58ec4da1b99e099124666e6da93b7705fde23913daa59f2ad479f99fcb4f0df152603bb0ba4875420b583f01fded0fec280a15
GMP.v6.2.1+6.aarch64-linux-gnu-cxx11.tar.gz/md5/86ba1313c8ab4ca1ae8313cbf96e1e7d
GMP.v6.2.1+6.aarch64-linux-gnu-cxx11.tar.gz/sha512/05c306c01d1b0e9e4dc7ce937075eeaede4e5e0791826a8892fae2eb73cdb7f22c4873cf31cea3cfe3db996ac77387346f4f8a851ce52c29883146678f3851fd
GMP.v6.2.1+6.aarch64-linux-musl-cxx03.tar.gz/md5/2fbbb9adee7db794f5888442b7b7688c
GMP.v6.2.1+6.aarch64-linux-musl-cxx03.tar.gz/sha512/d8a1719e529374d00ba6372013d0c7ddc9f44f9f6ee0f966b4ed16d731ce74c26b6e6a807403b3396bed67dd3e775e18c1e70c247a371d622a6e7013eb6b8905
GMP.v6.2.1+6.aarch64-linux-musl-cxx11.tar.gz/md5/b6a8c494d4c90decb6eacbca3ce3f22a
GMP.v6.2.1+6.aarch64-linux-musl-cxx11.tar.gz/sha512/6798406e20cc4d58647c266a2b1b8d0670e62f19bf4bff991c39eef13cf92c043f00717e7289bcc00007d7e248e943b37ba2eef89c9e68c42e30f0e2be9dd589
GMP.v6.2.1+6.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/a6866ee9784e9359e32dc18f417b2be7
GMP.v6.2.1+6.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/548953ccc8444886316d4dfd7081783e397ec180e88a1d17a464e4b1d0a27f51ee7f6a1936ddab499db192d3cdfdc87d572731c5ab2f87d528609dabfccad2d3
GMP.v6.2.1+6.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/6b78c826a4aedc8107c1bbfccbe5c097
GMP.v6.2.1+6.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/e8c075c29e4d8a916f087faeb2db50168e1a5546fcb02fc841477cf82a39188c3b9e7703b5354d4842880b5ac7215a32d022abe08aacc5e23238b63c6b994af4
GMP.v6.2.1+6.armv6l-linux-musleabihf-cxx03.tar.gz/md5/57e1a6c71b3c5b4047bf08bfc4d4f22d
GMP.v6.2.1+6.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/0f72c675ab3005ea183393bc4e5b4a157c13042367fd1bb3b03b3f7742e09604bddffb89f1478dc0dab4d992939519578549d05f9885b89319b0b51678b8a619
GMP.v6.2.1+6.armv6l-linux-musleabihf-cxx11.tar.gz/md5/65a13f49cbdaa9d3a8e20d0b84bbc701
GMP.v6.2.1+6.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/0487b18d1c9c59d990e6c4ec435b8dff91ae02d5d56c665b12aaaea105f7d2ab5beae9dfcbb133c990f70774b0d32e55df7f2e91e2d0a85c391a4090dcadf080
GMP.v6.2.1+6.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/30e20c183153f8ce60e564b35e4b54bd
GMP.v6.2.1+6.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/41bdabc2610b46b215043e98eaddb2e2ad0695ae15f3088c9beef24a97864dce4088ae68993de928d952baaf123f279d74705664fffbf96be9b7436f1ba7692b
GMP.v6.2.1+6.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/5f2cba31677e6681666c0b6ebd33c3ad
GMP.v6.2.1+6.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/a89399bf84bebf4b8432e48aae6dce5547bb6f1c048364697c577541c4f1a555b976370634624e9cf039fcbcb70e449a2f55563f0a4f48e60ee4653a185cf7dd
GMP.v6.2.1+6.armv7l-linux-musleabihf-cxx03.tar.gz/md5/4a682d832109d7ab5743832f73ca33d2
GMP.v6.2.1+6.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d5062bd8eee926eb1177e70e5d9e8d6ed7a00a17c25d2b165b974c01aa79d45ca97e219b26ded752b5f323546192d595b838b474c61bdd87e641549db9e9ef5d
GMP.v6.2.1+6.armv7l-linux-musleabihf-cxx11.tar.gz/md5/caa51529cb1b6dc8db765e202e1b7737
GMP.v6.2.1+6.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/d11ae870e68ca8d28bbcdf799a04769c3df2fbd169f6f2b16d88a556c40866b39636820ac3497e869086e638ba31dc1c87ec780add2d1aafe5e4ca178641678e
GMP.v6.2.1+6.i686-linux-gnu-cxx03.tar.gz/md5/dfcb024b9cfba37f80da5b7cc0c5b1ad
GMP.v6.2.1+6.i686-linux-gnu-cxx03.tar.gz/sha512/10eb086228b4250ecce11ad5bbec15e2bfff2429530cfd700602ead7f108163bc48fc83d9714443cbf5a93e7dd5f9046bdc15ef324486475f6b4be1cf34bad4b
GMP.v6.2.1+6.i686-linux-gnu-cxx11.tar.gz/md5/e889c1d65c9ca710c859129ae99ef322
GMP.v6.2.1+6.i686-linux-gnu-cxx11.tar.gz/sha512/4d97ebdd6a12d39907ccc9bad00266e286c949b3f99a306c1c4a4380a292694d944f275c351d9ddf465d020c8197b3b19dfccb5080249c75e3f5ffb9aa77a1c4
GMP.v6.2.1+6.i686-linux-musl-cxx03.tar.gz/md5/d57b3948e7a120bafeae67c28fe40869
GMP.v6.2.1+6.i686-linux-musl-cxx03.tar.gz/sha512/88165c809a73007d2b5e750d23c619fbb088f6de200aae1dee34b5e3783949150d91b94774cd1881d2a621d092c0e7e7332707ed4737ff8426686dfce7e0313a
GMP.v6.2.1+6.i686-linux-musl-cxx11.tar.gz/md5/e3c53fc468a9f48f9d06fdf51eafae62
GMP.v6.2.1+6.i686-linux-musl-cxx11.tar.gz/sha512/3c6a99acd84c226d7a48177c8e18624a677ea2a3df15fb2d54002eb5a6d55144b6f51f82ff491373366f32e92252fd14747503166621c2d2359029bdb1b20741
GMP.v6.2.1+6.i686-w64-mingw32-cxx03.tar.gz/md5/64b9bed188f9a300200659efdb9facef
GMP.v6.2.1+6.i686-w64-mingw32-cxx03.tar.gz/sha512/f7ed47cc29be31f99e612abd1db0d806ece84c117677cd639e04e2f6b08bbbfa4056ed9504bb073ec5f722de6955db668934f3d3ca05ddde0f22b096afcea2e3
GMP.v6.2.1+6.i686-w64-mingw32-cxx11.tar.gz/md5/a8f38cefb46dc9c3faddfd597d0e1a4c
GMP.v6.2.1+6.i686-w64-mingw32-cxx11.tar.gz/sha512/f02c3458c05869fab493d9be5ea98390baf6eed136fe2916cd6214c4f24a6f22d0716d59f352454fd4c799df71a8fd90e3a169644e1c6ffe89f3620f2a52f158
GMP.v6.2.1+6.powerpc64le-linux-gnu-cxx03.tar.gz/md5/7f8da2b7e16ef4cb593fea4bdb2e43eb
GMP.v6.2.1+6.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d0105fe7dfcc1daf7024d2f58b53240bab473c3ae44a904833d009beeb8e41f5487430f68e79bd79fc5c74b55f1111eb7479fedc84bcb45fe4dff3d8c3ac3e4f
GMP.v6.2.1+6.powerpc64le-linux-gnu-cxx11.tar.gz/md5/31fb7b6e37c650f0b8c3a2d475cb2b5b
GMP.v6.2.1+6.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/d03f3f1303996008ff267682de5b9d6e3be78ca1b0d6aa7cadbf4a612b331fe70460b689125f4ededa1c6078092ad3dafaad32c68a98d31713764a7a7461cf98
GMP.v6.2.1+6.x86_64-apple-darwin.tar.gz/md5/9276d90b4f850f167f673f731c7d3781
GMP.v6.2.1+6.x86_64-apple-darwin.tar.gz/sha512/f914452a49988b0694915483547c2f878c0ba71be2079fd1228b3e583cb08e92d8c958a052f29025054ded74cacb699893a5a6ef27749c851e83607ad3f1fe8f
GMP.v6.2.1+6.x86_64-linux-gnu-cxx03.tar.gz/md5/cded149fcef93ab1ba89c51d7cc58b73
GMP.v6.2.1+6.x86_64-linux-gnu-cxx03.tar.gz/sha512/8f97582d6323df6f86e3079b9a2534425bd4e64bb4cec337c21059605d50c1220fd006e55bdb34e8aa7195cd79ef518f1541c1b1a92187ed928f7939b3128dd6
GMP.v6.2.1+6.x86_64-linux-gnu-cxx11.tar.gz/md5/0529bb60dcf584222cd91e9e11510f24
GMP.v6.2.1+6.x86_64-linux-gnu-cxx11.tar.gz/sha512/0532821e81a4e51363570f87ec59c37dea24cab59a94e43127837ce4b388d1951853d50e52d4c9f30b4a21cfe222e368207239ce8ac0f1ee1e9375f51fb10127
GMP.v6.2.1+6.x86_64-linux-musl-cxx03.tar.gz/md5/2d332d096da5515581ee92128aff88ab
GMP.v6.2.1+6.x86_64-linux-musl-cxx03.tar.gz/sha512/b17f7b762bd4d61fa4c4be8124275c2b337383da167bdeaca34e44d71f20716b182b46bc5a6714a798a0951d73b335ab9c87f451cf4c5456edbe76cf3ad36ba4
GMP.v6.2.1+6.x86_64-linux-musl-cxx11.tar.gz/md5/a9dae953f9d59589162a3ea149c46d1e
GMP.v6.2.1+6.x86_64-linux-musl-cxx11.tar.gz/sha512/31e568aba38a29ec6713dda9eb1c7d7b50c2a736e8883ae8ff2eaf16840b15c93e6dc53025e7750d3ac3e4ffc7d2c91787bda5b799ecfdeea3d928657176b1b3
GMP.v6.2.1+6.x86_64-unknown-freebsd.tar.gz/md5/6f42d7486fa85ce1bf0cac409d1dd5ae
GMP.v6.2.1+6.x86_64-unknown-freebsd.tar.gz/sha512/5111751619388e51d1b3c0e32548a6de0aa02b7967994a4b4b78cdc9e0e852dae9d78bf48a503a6fb67e3b08343ddcf5a9f0b7a64a803c4d5067d69e4cb2edee
GMP.v6.2.1+6.x86_64-w64-mingw32-cxx03.tar.gz/md5/39cca70db2d23bc73a47870a0ee5156c
GMP.v6.2.1+6.x86_64-w64-mingw32-cxx03.tar.gz/sha512/a2877a6641e4cccd39e7ef093dd9ba7501c6e312f160b2924880d129195aadb74badfbf198fd6ee11035a6a7c99d64c0965c44526104a43569ca0d97fa565b5a
GMP.v6.2.1+6.x86_64-w64-mingw32-cxx11.tar.gz/md5/e2e03ed150558405ca1993ca14488662
GMP.v6.2.1+6.x86_64-w64-mingw32-cxx11.tar.gz/sha512/50995f6382ed2a4c425097e7abf762b847872734c104847f6a042090be132c68e864d34bb24baf64832d3636810cb631464767949eb2df2fedaa7ccd9824f78b
gmp-6.2.1.tar.bz2/md5/28971fc21cf028042d4897f02fd355ea
gmp-6.2.1.tar.bz2/sha512/8904334a3bcc5c896ececabc75cda9dec642e401fb5397c4992c4fabea5e962c9ce8bd44e8e4233c34e55c8010cc28db0545f5f750cbdbb5f00af538dc763be9
7 changes: 6 additions & 1 deletion deps/gmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ $(SRCCACHE)/gmp-$(GMP_VER)/gmp-CVE-2021-43618.patch-applied: $(SRCCACHE)/gmp-$(G
patch -p1 < $(SRCDIR)/patches/gmp-CVE-2021-43618.patch
echo 1 > $@

$(SRCCACHE)/gmp-$(GMP_VER)/source-patched: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-CVE-2021-43618.patch-applied
$(SRCCACHE)/gmp-$(GMP_VER)/gmp-more_alloc_overflow.patch-applied: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-CVE-2021-43618.patch-applied
cd $(dir $@) && \
patch -p1 < $(SRCDIR)/patches/gmp-more_alloc_overflow.patch
echo 1 > $@

$(SRCCACHE)/gmp-$(GMP_VER)/source-patched: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-more_alloc_overflow.patch-applied
echo 1 > $@

$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-patched
Expand Down
37 changes: 37 additions & 0 deletions deps/patches/gmp-more_alloc_overflow.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diff -ur gmp-6.2.1.orig/mpz/n_pow_ui.c gmp-6.2.1/mpz/n_pow_ui.c
--- gmp-6.2.1.orig/mpz/n_pow_ui.c 2023-09-08 11:41:16.620551175 +0200
+++ gmp-6.2.1/mpz/n_pow_ui.c 2023-09-08 12:49:29.650492180 +0200
@@ -220,8 +220,7 @@
umul_ppmm (ovfl, rtwos_bits, e, btwos);
if (ovfl)
{
- fprintf (stderr, "gmp: overflow in mpz type\n");
- abort ();
+ __GMP_ALLOC_OVERFLOW_FUNC ();
}

rtwos_limbs += rtwos_bits / GMP_NUMB_BITS;
@@ -382,8 +381,7 @@
umul_ppmm (ovfl, ralloc, (bsize*GMP_NUMB_BITS - cnt + GMP_NAIL_BITS), e);
if (ovfl)
{
- fprintf (stderr, "gmp: overflow in mpz type\n");
- abort ();
+ __GMP_ALLOC_OVERFLOW_FUNC ();
}
ralloc = ralloc / GMP_NUMB_BITS + 5;

diff -ur gmp-6.2.1.orig/tal-reent.c gmp-6.2.1/tal-reent.c
--- gmp-6.2.1.orig/tal-reent.c 2020-11-14 19:45:09.000000000 +0100
+++ gmp-6.2.1/tal-reent.c 2023-09-08 12:10:34.061357613 +0200
@@ -61,6 +61,11 @@

total_size = size + HSIZ;
p = __GMP_ALLOCATE_FUNC_TYPE (total_size, char);
+ if (!p)
+ {
+ __GMP_ALLOC_OVERFLOW_FUNC ();
+ }
P->size = total_size;
P->next = *markp;
*markp = P;
2 changes: 1 addition & 1 deletion stdlib/GMP_jll/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GMP_jll"
uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d"
version = "6.2.1+5"
version = "6.2.1+6"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand Down
5 changes: 5 additions & 0 deletions test/gmp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ ee = typemax(Int64)
@test BigInt <: Signed
@test big(1) isa Signed

if sizeof(Culong) >= 8
@test_throws OutOfMemoryError big(96608869069402268615522366320733234710)^16374500563449903721
@test_throws OutOfMemoryError 555555555555555555555555555555555555555555555555555^55555555555555555
end

let x = big(1)
@test signed(x) === x
@test convert(Signed, x) === x
Expand Down

0 comments on commit 71d6798

Please sign in to comment.