From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jason Hemann Newsgroups: gmane.lisp.guile.bugs Subject: bug#56543: bitwise-rotate-bit-field causes gmp overflow Date: Wed, 13 Jul 2022 17:55:25 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000381e5505e3b6d922" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34851"; mail-complaints-to="usenet@ciao.gmane.io" To: 56543@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Jul 14 00:16:12 2022 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBkeS-0008uK-98 for guile-bugs@m.gmane-mx.org; Thu, 14 Jul 2022 00:16:12 +0200 Original-Received: from localhost ([::1]:47068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBkeQ-00061g-RT for guile-bugs@m.gmane-mx.org; Wed, 13 Jul 2022 18:16:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBkeJ-00061W-5x for bug-guile@gnu.org; Wed, 13 Jul 2022 18:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBkeI-0000wI-TZ for bug-guile@gnu.org; Wed, 13 Jul 2022 18:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBkeI-0001sf-LL for bug-guile@gnu.org; Wed, 13 Jul 2022 18:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jason Hemann Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 13 Jul 2022 22:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56543 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16577505567213 (code B ref -1); Wed, 13 Jul 2022 22:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jul 2022 22:15:56 +0000 Original-Received: from localhost ([127.0.0.1]:47898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBkeB-0001sG-NF for submit@debbugs.gnu.org; Wed, 13 Jul 2022 18:15:56 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBkKp-0001HZ-Pw for submit@debbugs.gnu.org; Wed, 13 Jul 2022 17:55:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBkKp-0004Us-0J for bug-guile@gnu.org; Wed, 13 Jul 2022 17:55:55 -0400 Original-Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:46789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBkKn-0006aV-DJ for bug-guile@gnu.org; Wed, 13 Jul 2022 17:55:54 -0400 Original-Received: by mail-oi1-x233.google.com with SMTP id o133so197204oig.13 for ; Wed, 13 Jul 2022 14:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=4IdURiQBWyWLDscLlVwNUt9KqcnKhOKEZsdGzWCZquw=; b=g2bQDSr27+wVPiZVtzn5wIaCCj0112z4rn4FLsxcwNWl2yO8UZlM8hPFmXJbKYYGJJ G8qCyGtVCJKq/cBW6dhGTCZr3rHTo8lje0Qdh9BtDmemr7GmUWXTFcQbELCQ+vV8xa6d fO90UK0bP9DC4dCOBKDhcW3ixGSatgIbU6+LCvM2smTD5VcAJRdqxNQW/wTBZLqzyUDu wb4gsFyaB5Zxkin7xo0+FGzPd5ihd62pFWYK7Ze8SuV6/9Pf3EV705b+DKRox3+a/4Na yNOHT7ZpO3txmaNX55OnC5cT2zQmXE2GusFqUf60Ka8HEhyuiXCPn1qrFKd7qZFyi9mS JlkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4IdURiQBWyWLDscLlVwNUt9KqcnKhOKEZsdGzWCZquw=; b=wwUC5y9C/o3FBaKpPyykN1MTRd8+LDP6490bJVzi5/eS9hvUPWpD4cBWBMOOCQj1Rz SypwnbmThDYVUGybValGEtZmz4DoOnJf/Q0MwOJJauep1MHKeD+BmeJhU8srFE/XumH5 WjQN/YnMKd++6IULYVy0atcWT5WY64Ids3ZQlhRs/ENKGTcg4KKQlX25dXJJuHvuI6ZW 3AxOmvHAAWiV5VRKrHccs047Ttu7zsxPDD3Iizj3Nn4OM/f9RQNMXL8O3m5c6Hj6Mg3J 3uGQ03MvSZIF+0FmnmDiX6PcoHfFA74N5F5ZHOxNXd2jDE7TCR+PsrZ+Xydm//050w2C Cj+g== X-Gm-Message-State: AJIora8+QHTBqmcbNbQhMFleAjNUUVA60uNVZhnOij8TnvOMMcURK/+V t0QQIkj1VowkJGdD4FdlSbQT7OcIjrF4t46oM96+uat2OtIRIA== X-Google-Smtp-Source: AGRyM1vZlV2ztKMrMRPxovFvDekux1UGoRxVqAPeBGPq0Q+v/mGSCcd6QSR88oAio3vAxkUTXML5jmMv2+4k33ztbbI= X-Received: by 2002:a05:6808:1a10:b0:335:9e39:693b with SMTP id bk16-20020a0568081a1000b003359e39693bmr2800339oib.165.1657749351438; Wed, 13 Jul 2022 14:55:51 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=jason.hemann@gmail.com; helo=mail-oi1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 13 Jul 2022 18:15:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10302 Archived-At: --000000000000381e5505e3b6d922 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable When I run G=C3=B6ran Weinholt's schjig 's `schjig.scm` against guile 3.0.8 I encounter the following error. Please notice that I first switch on r6rs compatibility mode. I have no `.guile` file. I did not see this listed on the R6RS incompatibilities . Is this a bug, either in guile or gmp? ```shell $ guile (install-r6rs!) (load "schjig.scm") ... (check (bitwise-rotate-bit-field 573972483446053417 1238 4006 -1627) =3D> (quote 573972483446053417)) gmp: overflow in mpz type Abort trap: 6 ``` Best, JBH --000000000000381e5505e3b6d922 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When I run=C2=A0G=C3=B6ran Weinholt's schjig= 's=C2=A0`schjig.scm` against guile 3.0.8 I encounter the following error. Please notice that = I first switch on r6rs compatibility mode. I have no `.guile` file. I did n= ot see this listed on the R6RS incompatibilities. Is t= his a bug, either in guile or gmp?

```shell
$ guile
(install-r6rs!)
(load "schjig.scm= ")
...
(check (bitwise-rotate-bit-field 573972= 483446053417 1238 4006 -1627) =3D> (quote 573972483446053417))
gmp: o= verflow in mpz type
Abort trap: 6
```

Best,

JBH
--000000000000381e5505e3b6d922--