From unknown Fri Jun 20 07:09:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13827 <13827@debbugs.gnu.org> To: bug#13827 <13827@debbugs.gnu.org> Subject: Status: faulty range check in bytevector accessor Reply-To: bug#13827 <13827@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:06 +0000 retitle 13827 faulty range check in bytevector accessor reassign 13827 guile submitter 13827 Ian Price severity 13827 normal tag 13827 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 26 21:04:15 2013 Received: (at submit) by debbugs.gnu.org; 27 Feb 2013 02:04:15 +0000 Received: from localhost ([127.0.0.1]:52043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAWNS-0004gV-Vf for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:04:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40566) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAWNQ-0004gM-9e for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:04:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAWLe-00081W-3l for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:02:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWLe-00081S-0H for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:02:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWLc-0004zx-Og for bug-guile@gnu.org; Tue, 26 Feb 2013 21:02:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAWLa-00080Y-4G for bug-guile@gnu.org; Tue, 26 Feb 2013 21:02:20 -0500 Received: from plane.gmane.org ([80.91.229.3]:38560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWLZ-00080B-UN for bug-guile@gnu.org; Tue, 26 Feb 2013 21:02:18 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UAWLs-0000mS-JV for bug-guile@gnu.org; Wed, 27 Feb 2013 03:02:36 +0100 Received: from host81-159-31-223.range81-159.btcentralplus.com ([81.159.31.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Feb 2013 03:02:36 +0100 Received: from ianprice90 by host81-159-31-223.range81-159.btcentralplus.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Feb 2013 03:02:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-guile@gnu.org From: Ian Price Subject: faulty range check in bytevector accessor Date: Wed, 27 Feb 2013 02:02:06 +0000 Lines: 22 Message-ID: <87liaay0o1.fsf@Kagami.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host81-159-31-223.range81-159.btcentralplus.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:Z7EvxHKerGD1U0UbfR5d3A+uWbo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Branch: master Commit: 9b977c836bf147d386944c401113aba32776fa68 System: 32 bit x86 Fedora 16 (use-modules (rnrs bytevectors)) (define not-32-bit (expt 2 32)) (define bv (make-bytevector 4)) (bytevector-u32-set! bv 0 not-32-bit (endianness big)) (pk bv) Running this gives me a core dump. It happens for a wide range of values that don't fit in 32 bits. After some talk on #guile, Mark and I believe it comes down to the range check in INTEGER_ACCESSOR_PROLOGUE in bytevectors.c -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 26 21:32:20 2013 Received: (at 13827) by debbugs.gnu.org; 27 Feb 2013 02:32:20 +0000 Received: from localhost ([127.0.0.1]:52074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAWoe-0005KZ-6T for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:32:20 -0500 Received: from world.peace.net ([96.39.62.75]:60346) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAWob-0005KQ-Ub for 13827@debbugs.gnu.org; Tue, 26 Feb 2013 21:32:19 -0500 Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UAWml-0004oZ-D0; Tue, 26 Feb 2013 21:30:23 -0500 From: Mark H Weaver To: Ian Price Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> Date: Tue, 26 Feb 2013 21:30:15 -0500 In-Reply-To: <87liaay0o1.fsf@Kagami.home> (Ian Price's message of "Wed, 27 Feb 2013 02:02:06 +0000") Message-ID: <87y5eaxzd4.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13827 Cc: 13827@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Ian Price writes: > After some talk on #guile, Mark and I believe it comes down to the range > check in INTEGER_ACCESSOR_PROLOGUE in bytevectors.c Going a bit further: INTEGER_ACCESSOR_PROLOGUE uses 'scm_to_uint', which I believe should fail for 2^32 on a 32-bit machine. According to numbers.h:430, 'scm_to_uint' should be an alias for 'scm_to_uint32', which is defined in numbers.c:9277 and conv-uinteger.i.c:27. It seems to me that it ought to be getting to conv-uinteger.i.c:50, which calls 'mpz_fits_ulong_p'. So maybe it's a bug in the version of libgmp on Ian's machine, or perhaps I'm missing something. I don't know whether it's possible to step through the code in 'conv-uinteger.i.c' using gdb. If so, I'd like to see what happens. If not, I suspect the next step is to write some test programs in C and try them on Ian's machine: first test 'scm_to_uint32', which should raise an exception for 2^32. If it doesn't then try testing 'mpz_fits_ulong_p' directly and see if it's broken. Thanks, Mark From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 27 06:44:48 2013 Received: (at 13827) by debbugs.gnu.org; 27 Feb 2013 11:44:48 +0000 Received: from localhost ([127.0.0.1]:52757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAfRH-0001Ld-LF for submit@debbugs.gnu.org; Wed, 27 Feb 2013 06:44:48 -0500 Received: from xanadu.aquilenet.fr ([88.191.123.111]:42324) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAfRC-0001LN-02 for 13827@debbugs.gnu.org; Wed, 27 Feb 2013 06:44:42 -0500 Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id D4947BE6C; Wed, 27 Feb 2013 12:42:50 +0100 (CET) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dMEcf3+bvdb4; Wed, 27 Feb 2013 12:42:50 +0100 (CET) Received: from pluto (pluto.sophia.inria.fr [138.96.204.192]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 95D17162D; Wed, 27 Feb 2013 12:42:50 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ian Price Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Vent=C3=B4se?= an 221 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 27 Feb 2013 12:42:50 +0100 In-Reply-To: <87liaay0o1.fsf@Kagami.home> (Ian Price's message of "Wed, 27 Feb 2013 02:02:06 +0000") Message-ID: <87r4k2x9s5.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Ian Price skribis: > Branch: master > Commit: 9b977c836bf147d386944c401113aba32776fa68 > System: 32 bit x86 Fedora 16 > > (use-modules (rnrs bytevectors)) > (define not-32-bit (expt 2 32)) > (define bv (make-bytevector 4)) > (bytevector-u32-set! bv 0 not-32-bit (endianness big)) > (pk bv) [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4989] X-Debbugs-Envelope-To: 13827 Cc: 13827@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.7 (/) Ian Price skribis: > Branch: master > Commit: 9b977c836bf147d386944c401113aba32776fa68 > System: 32 bit x86 Fedora 16 > > (use-modules (rnrs bytevectors)) > (define not-32-bit (expt 2 32)) > (define bv (make-bytevector 4)) > (bytevector-u32-set! bv 0 not-32-bit (endianness big)) > (pk bv) FWIW, with 2.0.7+ on x86_64-linux-gnu, with GMP 5.1.0: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (use-modules (rnrs bytevectors)) scheme@(guile-user)> (define not-32-bit (expt 2 32)) scheme@(guile-user)> (define bv (make-bytevector 4)) scheme@(guile-user)> (bytevector-u32-set! bv 0 not-32-bit (endianness big)) :4:0: In procedure #:4:0= ()>: :4:0: In procedure bytevector-u32-set!: Value out of range: 4= 294967296 Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. --8<---------------cut here---------------end--------------->8--- As Mark pointed out, it could be due to the GMP version you=E2=80=99re usin= g. Could you check that? TIA, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 27 20:40:39 2013 Received: (at 13827) by debbugs.gnu.org; 28 Feb 2013 01:40:39 +0000 Received: from localhost ([127.0.0.1]:54532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAsU9-00055q-Vj for submit@debbugs.gnu.org; Wed, 27 Feb 2013 20:40:39 -0500 Received: from world.peace.net ([96.39.62.75]:35442) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAsU1-00055c-M1 for 13827@debbugs.gnu.org; Wed, 27 Feb 2013 20:40:32 -0500 Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UAsS5-0008Ej-8v; Wed, 27 Feb 2013 20:38:29 -0500 From: Mark H Weaver To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> <87r4k2x9s5.fsf@gnu.org> Date: Wed, 27 Feb 2013 20:38:17 -0500 In-Reply-To: <87r4k2x9s5.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 27 Feb 2013 12:42:50 +0100") Message-ID: <87k3ptxlo6.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 13827 Cc: Ian Price , 13827@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Ian Price skribis: > >> Branch: master >> Commit: 9b977c836bf147d386944c401113aba32776fa68 >> System: 32 bit x86 Fedora 16 >> >> (use-modules (rnrs bytevectors)) >> (define not-32-bit (expt 2 32)) >> (define bv (make-bytevector 4)) >> (bytevector-u32-set! bv 0 not-32-bit (endianness big)) >> (pk bv) > > FWIW, with 2.0.7+ on x86_64-linux-gnu, with GMP 5.1.0: > > scheme@(guile-user)> (use-modules (rnrs bytevectors)) > scheme@(guile-user)> (define not-32-bit (expt 2 32)) > scheme@(guile-user)> (define bv (make-bytevector 4)) > scheme@(guile-user)> (bytevector-u32-set! bv 0 not-32-bit (endianness big= )) > :4:0: In procedure #:4= :0 ()>: > :4:0: In procedure bytevector-u32-set!: Value out of range:= 4294967296 That's because you're on a 64-bit system, where 2^32 is no difficulty. Mark From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 28 15:22:18 2013 Received: (at 13827) by debbugs.gnu.org; 28 Feb 2013 20:22:19 +0000 Received: from localhost ([127.0.0.1]:56669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB9ze-00089k-K2 for submit@debbugs.gnu.org; Thu, 28 Feb 2013 15:22:18 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:34082) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB9zb-00089b-Si for 13827@debbugs.gnu.org; Thu, 28 Feb 2013 15:22:16 -0500 Received: by mail-we0-f175.google.com with SMTP id x8so1892009wey.20 for <13827@debbugs.gnu.org>; Thu, 28 Feb 2013 12:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=3yqPxf0vdcY/FtKW2QMfFCd1pDI+qgiaMqOYYqEFf/M=; b=Ljp9e03ruCm5bJlByV0j+esZlAfdtLjiZryK8g0AKGtXh8AH536BEmnpo2I8tWYWrw 5mQnjf6Sbys/8xe4vwlljm2S1IGnjTQGAxY4EA/75HfCT7gUh6keQ+h4HqvNxAS1yvhp tqFXguaIM7F09LH7wU2d48WmlXfvnsrTveLhHHJDSMt5P+iYrcsFgvdFtxMHuFsdFDHF vN1pIuGabKXMnFFOBRIeLbPo/BV4jghOERkC5YYJ3eIUxEkvNbkaG8KOJPUHXXQcLIzu r3JejMP0TtNLdoUA55CN2fmMqse500ICjI4xsbum6waJTyPvDmHuYW9p44y3dNg2IOf9 lh4A== X-Received: by 10.180.86.136 with SMTP id p8mr12914654wiz.21.1362082817138; Thu, 28 Feb 2013 12:20:17 -0800 (PST) Received: from Kagami.home (host86-171-27-34.range86-171.btcentralplus.com. [86.171.27.34]) by mx.google.com with ESMTPS id ed6sm17813311wib.9.2013.02.28.12.20.14 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 28 Feb 2013 12:20:15 -0800 (PST) From: Ian Price To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> <87r4k2x9s5.fsf@gnu.org> Date: Thu, 28 Feb 2013 20:20:07 +0000 In-Reply-To: <87r4k2x9s5.fsf@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Wed, 27 Feb 2013 12:42:50 +0100") Message-ID: <87r4k0fax4.fsf@Kagami.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp-2 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 13827 Cc: 13827@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) ludo@gnu.org (Ludovic Court$(D+2(Bs) writes: > As Mark pointed out, it could be due to the GMP version you$B!G(Bre using. > > Could you check that? Well, I wouldn't rule it out until I've had a proper look. I believe I am running 4.3.2, but do you have a specific test in mind? I'm going away for the weekend, though, so I won't really be able to debug this properly till Monday. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 13 08:56:31 2013 Received: (at 13827) by debbugs.gnu.org; 13 Mar 2013 12:56:31 +0000 Received: from localhost ([127.0.0.1]:50569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFlEK-0006EU-H7 for submit@debbugs.gnu.org; Wed, 13 Mar 2013 08:56:30 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:58772 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFlEF-0006EI-62 for 13827@debbugs.gnu.org; Wed, 13 Mar 2013 08:56:26 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 76953B53F; Wed, 13 Mar 2013 08:55:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=s6HCU67Du8EaIdl7fnkvhapdZ6Q=; b=gYWHqM RejZngVsCBwGAjemEoKsgzfddIqPwT0B+s0Slv7U30PXkIaDu2G9A5aiaojwvDO/ 5EkrMZDoSJSh5jr4dQRmgCDt6ZHKC0b6u9fQMHE8LgroLJxvBYfr+Nk3d4+Dqehy m4mvcPyHCV6ci1PndRZ5IcJOwf4k7VQ21nFnA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=yjjI8asDJXrw76mQVyEpITFh8ekrn3lY PGup/+i7F2WPj76p5xrWIb/IVgzOq6mm64cOig3buCXc66up+QsgrFPkweV/EFf6 s2se0gI9HLFADlcpZK4KXo0fQLHCikxnh9FYzoJk46eKvxhNmSU5LXHatmRLzrFU 7jSPoa3x35M= Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 6CDA1B53E; Wed, 13 Mar 2013 08:55:17 -0400 (EDT) Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id B91D1B53D; Wed, 13 Mar 2013 08:55:16 -0400 (EDT) From: Andy Wingo To: Ian Price Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> Date: Wed, 13 Mar 2013 13:55:14 +0100 In-Reply-To: <87liaay0o1.fsf@Kagami.home> (Ian Price's message of "Wed, 27 Feb 2013 02:02:06 +0000") Message-ID: <87k3pbh32l.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 40FC3CCA-8BDD-11E2-9FD3-59240E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 13827 Cc: 13827@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) On Wed 27 Feb 2013 03:02, Ian Price writes: > Branch: master > Commit: 9b977c836bf147d386944c401113aba32776fa68 > System: 32 bit x86 Fedora 16 > > (use-modules (rnrs bytevectors)) > (define not-32-bit (expt 2 32)) > (define bv (make-bytevector 4)) > (bytevector-u32-set! bv 0 not-32-bit (endianness big)) > (pk bv) > > Running this gives me a core dump. It happens for a wide range of values > that don't fit in 32 bits. > > After some talk on #guile, Mark and I believe it comes down to the range > check in INTEGER_ACCESSOR_PROLOGUE in bytevectors.c Something like this look right to you? --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +/* Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -82,12 +82,12 @@ _sign char *c_bv; \ \ SCM_VALIDATE_BYTEVECTOR (1, bv); \ - c_index = scm_to_uint (index); \ + c_index = scm_to_size_t (index); \ \ c_len = SCM_BYTEVECTOR_LENGTH (bv); \ c_bv = (_sign char *) SCM_BYTEVECTOR_CONTENTS (bv); \ \ - if (SCM_UNLIKELY (c_index + ((_len) >> 3UL) - 1 >= c_len)) \ + if (SCM_UNLIKELY (c_index >= c_len)) \ scm_out_of_range (FUNC_NAME, index); /* Template for fixed-size integer access (only 8, 16 or 32-bit). */ -- http://wingolog.org/ From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 13 10:39:11 2013 Received: (at 13827) by debbugs.gnu.org; 13 Mar 2013 14:39:11 +0000 Received: from localhost ([127.0.0.1]:51377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFmpg-0000HW-UQ for submit@debbugs.gnu.org; Wed, 13 Mar 2013 10:39:10 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:62735 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFmpd-0000HN-6s for 13827@debbugs.gnu.org; Wed, 13 Mar 2013 10:39:06 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 20D92BD11; Wed, 13 Mar 2013 10:37:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=EpuHUh1v7EZczsZNuEDNGQg1ry4=; b=imCAlG qJQDOQdlWw6M6scbAoOTMLDw6nYjesiCYq9KHlN/sZlaFVtAEDKhdfQhz/nkWMA4 52moEGTEWvGJKuOSetFbZn8wgBBj2W8D6dEuv8XfRhM/mb8+SqMD8+WcHLLU8NC6 ZancnxZOfQBup+lEd7Q+4ifa91skWplIADgpA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=LnSVadbDdgsu3/tNaGpNPq9ZG+bCDATg OglDoqDLq80iCpuSLEaXWg9XX3s+n8mVzkBalCK6Geru1Q6mr7DLHFBouOuHIh2i ZjLSUDai9ITwQyeQHr/m+njBvHILHEjb3HYAjaXIIWiHes612DzEkaMi+6JR2BLQ 5TED66H6Vos= Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 1A12FBD10; Wed, 13 Mar 2013 10:37:59 -0400 (EDT) Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 949E7BD0F; Wed, 13 Mar 2013 10:37:58 -0400 (EDT) From: Andy Wingo To: Ian Price Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> <87k3pbh32l.fsf@pobox.com> Date: Wed, 13 Mar 2013 15:37:56 +0100 In-Reply-To: <87k3pbh32l.fsf@pobox.com> (Andy Wingo's message of "Wed, 13 Mar 2013 13:55:14 +0100") Message-ID: <87mwu7fjqz.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 99BC0FD0-8BEB-11E2-9F90-59240E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 13827 Cc: 13827@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) On Wed 13 Mar 2013 13:55, Andy Wingo writes: > - if (SCM_UNLIKELY (c_index + ((_len) >> 3UL) - 1 >= c_len)) \ > + if (SCM_UNLIKELY (c_index >= c_len)) \ > scm_out_of_range (FUNC_NAME, index); I see the intention was to take into account the size of the access (e.g. 32 bits). Confusing with len, _len, and c_len... -- http://wingolog.org/ From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 27 16:22:54 2014 Received: (at control) by debbugs.gnu.org; 27 Jul 2014 20:22:54 +0000 Received: from localhost ([127.0.0.1]:39620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBUy5-0007SR-Cs for submit@debbugs.gnu.org; Sun, 27 Jul 2014 16:22:54 -0400 Received: from mout.gmx.com ([74.208.4.201]:54798) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBSSh-0003Zn-QL; Sun, 27 Jul 2014 13:42:20 -0400 Received: from [198.96.155.3] by 3capp-mailcom-lxa04.server.lan (via HTTP); Sun, 27 Jul 2014 19:42:12 +0200 MIME-Version: 1.0 Message-ID: From: "Ben Rocer" To: 13827@debbugs.gnu.org Subject: bug#13827: faulty range check in bytevector accessor Content-Type: text/plain; charset=UTF-8 Date: Sun, 27 Jul 2014 19:42:12 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K0:wMvtdxdavuTsDPoz5TofNbM2WhkOBZi17Dy6KfFtwq4 KO7c9bkjfbQL9Y7Bh8gRAZEUSftE1Jb7OYTKO7YNuuq7celVr4 jgDhyv09V9HSfTzvZue//cg4zGMfbMusN+kKIChlgLQ75yOVm+ MZVoMc7fYk0MBohWEUu4X6ntkTElin1Rlgf6/W74/Lj//QBJYn +eFZwoDqHYnpmyUFAAVRX1664K+W3XPwiPGiKa+YKWQCnW88px mFgT8lJRFHJz9PhmSLf9KvOssI4eN3gA5wQbnkxFKc1WLhkCl9 ClnycHpO8ibkKeryAFoGt156r/z X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-Mailman-Approved-At: Sun, 27 Jul 2014 16:22:52 -0400 Cc: control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 13827 patch thanks When I tried to reproduce this bug on a 32-bit x86 system, I got an abort in the function bytevector_large_set(); I think this is also where the bug is. Specifically, there are two bugs in these two consecutive lines in bytevector_large_set(): value_size = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size)) / (8 * c_size); if (SCM_UNLIKELY (value_size > c_size)) In the first line, there is an off-by-one error in the calculation of value_size; it gives the wrong answer if mpz_sizeinbase() is a multiple of (8 * c_size) (see https://gmplib.org/manual/Integer-Import-and-Export.html). Secondly, this calculation gives the number of (c_size-byte) *words* required to hold c_mpz, not the number of bytes. So the check in the next line should be (c_size * value_size > c_size), or equivalently (value_size > 1). Since bytevector-u64-set! also calls bytevector_large_set, it may be possible to reproduce this bug on 64 bit systems too; e.g (bytevector-u64-set! (make-bytevector 8) 0 (expt 2 64) (endianness big)) [untested] --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -867,10 +867,10 @@ bytevector_large_set (char *c_bv, size_t c_size, int signed_p, memset (c_bv, 0, c_size); else { - size_t word_count, value_size; + size_t word_count, value_words; - value_size = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size)) / (8 * c_size); - if (SCM_UNLIKELY (value_size > c_size)) + value_words = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size) - 1) / (8 * c_size); + if (SCM_UNLIKELY (value_words > 1)) { err = -2; goto finish; From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 28 10:35:53 2014 Received: (at submit) by debbugs.gnu.org; 28 Jul 2014 14:35:53 +0000 Received: from localhost ([127.0.0.1]:40895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBm1k-0004e4-Uv for submit@debbugs.gnu.org; Mon, 28 Jul 2014 10:35:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44560) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBm1e-0004dk-Mf for submit@debbugs.gnu.org; Mon, 28 Jul 2014 10:35:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBm1T-0007a4-Ax for submit@debbugs.gnu.org; Mon, 28 Jul 2014 10:35:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBm1T-0007a0-7y for submit@debbugs.gnu.org; Mon, 28 Jul 2014 10:35:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBm1N-0007aB-Cc for bug-guile@gnu.org; Mon, 28 Jul 2014 10:35:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBm1H-0007YO-Gw for bug-guile@gnu.org; Mon, 28 Jul 2014 10:35:25 -0400 Received: from mout.gmx.com ([74.208.4.201]:54331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBm1H-0007Y5-BX for bug-guile@gnu.org; Mon, 28 Jul 2014 10:35:19 -0400 Received: from [162.247.73.206] by 3capp-mailcom-lxa07.server.lan (via HTTP); Mon, 28 Jul 2014 16:35:15 +0200 MIME-Version: 1.0 Message-ID: From: "Ben Rocer" To: bug-guile@gnu.org Subject: bug#13827: faulty range check in bytevector accessor Content-Type: text/plain; charset=UTF-8 Date: Mon, 28 Jul 2014 16:35:15 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K0:kOvobkbWWYU94ewQVEzaZ4zt8C6GBWt+D0rg02GhG8U tqv2Odnyr6euidwccInPr4VC8cYYRHpRU/vhjV4FdAvYgQcYJt dN4U+CZgk/QjpC3zp2EoE4+2O2zQpjWfdCNahPGngSEH040mPy BFSpVGp8flp5GLvba6fSom7D41GXTeg//E73qLShu6I8C+kDaZ U4ew8R3klpmqzDnK65cXNe+k1N04edv3Ieu0LPYoRgTSuaXGfN eKR4Ruz8i6oj1aBFkw2+NHNtKr/doQugte//34xrDaHC/Rg6BH m9fmzEgQ39Rct1828txg6mM30cf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) [resubmitting to bug-guile@gnu.org as debbugs seems to have eaten my first mail] When I tried to reproduce this bug on a 32-bit x86 system, I got an abort in the function bytevector_large_set(); I think this is also where the bug is. Specifically, there are two bugs in these two consecutive lines in bytevector_large_set(): value_size = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size)) / (8 * c_size); if (SCM_UNLIKELY (value_size > c_size)) In the first line, there is an off-by-one error in the calculation of value_size; it gives the wrong answer if mpz_sizeinbase() is a multiple of (8 * c_size) (see https://gmplib.org/manual/Integer-Import-and-Export.html). Secondly, this calculation gives the number of (c_size-byte) *words* required to hold c_mpz, not the number of bytes. So the check in the next line should be (c_size * value_size > c_size), or equivalently (value_size > 1). Since bytevector-u64-set! also calls bytevector_large_set, it may be possible to reproduce this bug on 64 bit systems too; e.g (bytevector-u64-set! (make-bytevector 8) 0 (expt 2 64) (endianness big)) [untested] --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -867,10 +867,10 @@ bytevector_large_set (char *c_bv, size_t c_size, int signed_p, memset (c_bv, 0, c_size); else { - size_t word_count, value_size; + size_t word_count, value_words; - value_size = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size)) / (8 * c_size); - if (SCM_UNLIKELY (value_size > c_size)) + value_words = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size) - 1) / (8 * c_size); + if (SCM_UNLIKELY (value_words > 1)) { err = -2; goto finish; From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 20 11:16:16 2016 Received: (at 13827-done) by debbugs.gnu.org; 20 Jun 2016 15:16:16 +0000 Received: from localhost ([127.0.0.1]:47861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF0vw-0000Na-3m for submit@debbugs.gnu.org; Mon, 20 Jun 2016 11:16:16 -0400 Received: from pb-sasl2.pobox.com ([64.147.108.67]:53546 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF0vu-0000NQ-33 for 13827-done@debbugs.gnu.org; Mon, 20 Jun 2016 11:16:14 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 7B438233B8; Mon, 20 Jun 2016 11:16:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=TG2alww4aX5c5Cb1f/Bc2lTYFQY=; b=gNAlTx 322+tNTMNmyuMhWFa8wXsBxen5DFZOCkErprX5WoE0uJ6cN7URlIxG3+cyg+Ibdc QjW8KIXLHiQw0rnBLNxgG3iAa11fJBqfrj1s024Ck3sc9g8pCk1oNYI1jTCGcsfF 8V5SxnGYIE3/Ct4Hgq9/ABefV14jLvzVNA9XU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=KmKkGbwbheXm8gb6pZ6xI7Ze2gfrLSbf RbuM8X5cMf4eqiCNfGsd5p6mOpU4qHaywhS4xNIxoYC27OqNdUIh6LqK2Dznr3Re w2CaoJXij8Iin2iguD+Ho3VwDA4U8PqSVvHu3Wjof3ZzXLN/91sYi5x5r2lG0JLU 2E2OEShTG10= Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 740CC233B7; Mon, 20 Jun 2016 11:16:13 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id 733EB233B5; Mon, 20 Jun 2016 11:16:12 -0400 (EDT) From: Andy Wingo To: "Ben Rocer" Subject: Re: bug#13827: faulty range check in bytevector accessor References: <87liaay0o1.fsf@Kagami.home> Date: Mon, 20 Jun 2016 17:16:05 +0200 In-Reply-To: (Ben Rocer's message of "Mon, 28 Jul 2014 16:35:15 +0200") Message-ID: <87fus7howa.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: ECB1A1FC-36F9-11E6-82CD-28A6F1301B6D-02397024!pb-sasl2.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 13827-done Cc: 13827-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hi! Thank you very much for the bug report and fix! Applied to master, will be part of 2.1.4. Cheers, Andy On Mon 28 Jul 2014 16:35, "Ben Rocer" writes: > [resubmitting to bug-guile@gnu.org as debbugs seems to have eaten my > first mail] > > When I tried to reproduce this bug on a 32-bit x86 system, I got an > abort in the function bytevector_large_set(); I think this is also > where the bug is. > > Specifically, there are two bugs in these two consecutive lines in > bytevector_large_set(): > > value_size = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size)) / (8 * c_size); > if (SCM_UNLIKELY (value_size > c_size)) > > In the first line, there is an off-by-one error in the calculation of > value_size; it gives the wrong answer if mpz_sizeinbase() is a > multiple of (8 * c_size) (see > https://gmplib.org/manual/Integer-Import-and-Export.html). > > Secondly, this calculation gives the number of (c_size-byte) *words* > required to hold c_mpz, not the number of bytes. So the check in the > next line should be (c_size * value_size > c_size), or equivalently > (value_size > 1). > > Since bytevector-u64-set! also calls bytevector_large_set, it > may be possible to reproduce this bug on 64 bit systems too; e.g > (bytevector-u64-set! (make-bytevector 8) 0 (expt 2 64) (endianness big)) > [untested] > > > --- a/libguile/bytevectors.c > +++ b/libguile/bytevectors.c > @@ -867,10 +867,10 @@ bytevector_large_set (char *c_bv, size_t c_size, int signed_p, > memset (c_bv, 0, c_size); > else > { > - size_t word_count, value_size; > + size_t word_count, value_words; > > - value_size = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size)) / (8 * c_size); > - if (SCM_UNLIKELY (value_size > c_size)) > + value_words = (mpz_sizeinbase (c_mpz, 2) + (8 * c_size) - 1) / (8 * c_size); > + if (SCM_UNLIKELY (value_words > 1)) > { > err = -2; > goto finish; From unknown Fri Jun 20 07:09:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 19 Jul 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator