From unknown Fri Jun 20 07:19:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59874: Segfault from string-ref with negative 'k' Resent-From: rose gibson Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 07 Dec 2022 09:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59874 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 59874@debbugs.gnu.org X-Debbugs-Original-To: "\"Guile Bug Reports\"" Received: via spool by submit@debbugs.gnu.org id=B.16704046835051 (code B ref -1); Wed, 07 Dec 2022 09:19:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Dec 2022 09:18:03 +0000 Received: from localhost ([127.0.0.1]:48719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2qYy-0001J8-Qt for submit@debbugs.gnu.org; Wed, 07 Dec 2022 04:18:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:36740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2pCQ-0000S4-2q for submit@debbugs.gnu.org; Wed, 07 Dec 2022 02:50:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2pC3-00036S-He for bug-guile@gnu.org; Wed, 07 Dec 2022 02:50:27 -0500 Received: from w1.tutanota.de ([81.3.6.162]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2pC1-0005tn-Rc for bug-guile@gnu.org; Wed, 07 Dec 2022 02:50:15 -0500 Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 61FC3FBF534 for ; Wed, 7 Dec 2022 07:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670399409; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=GAn2quD/A0FgTT87F6XEEXwYE2vYP53abDsDwpXUVKU=; b=KCOegNwe3nI0wxD0HPln/6eM6vsPZ7qzm+ADI4LgCVNLzFHWAEgFGWTA5yf0rsnc 2VnSW181IkuwcK7GC79R42N9PsL0jdgcsGLe+JPTg85WZwoF2RDv3dVWrL+vOSlLVrZ RlnaYqwd97B5e1UERlGkRiY5EM70wiEmK/uDybV8zGnq1c8njQlRm/tyHDTM1b1gTB6 WCIn11dWhDOMVXUXiS3qakHAwSGYl9zMODwZsSKg5uKhLpw0185boZSlgLl4Syl8g1F 57mMN60vHO9TEJBkrNoCLwjymi5FXqsQqATB3qevGvGZuT7spLLbUnJWuhGEEk9wc0C /m/vFmqMaw== Date: Wed, 7 Dec 2022 08:50:09 +0100 (CET) From: rose gibson Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=81.3.6.162; envelope-from=birdswinter@tutanota.com; helo=w1.tutanota.de 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Mailman-Approved-At: Wed, 07 Dec 2022 04:17:59 -0500 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: -2.4 (--) hi, i noticed that if i, on my system, run "guile" from a shell and then type i= nto the command prompt that appears, (string-ref "a string" -1) guile appears to hang for a few seconds or so, and then prints the message = "Segmentation fault (core dumped)". i'm not really sure if this report is worth anything, it might just be some= glitch in my distribution's build or something else unreproducable and wei= rd, idk.=C2=A0 but i thought i would say something.=C2=A0 just in case. this is with guile 3.0.8 on arch linux.=C2=A0 i didn't do anything special = with respect to building guile myself or anything like that, it was (i'm pr= etty sure) just installed from the repositories. i'm definitely curious what's up if anyone ever bothers to take the time fi= guring it out. thanks :) From unknown Fri Jun 20 07:19:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59874: Segfault from string-ref with negative 'k' Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 07 Dec 2022 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59874 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 59874@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16704073577370 (code B ref -1); Wed, 07 Dec 2022 10:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Dec 2022 10:02:37 +0000 Received: from localhost ([127.0.0.1]:49084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2rG9-0001uo-Ak for submit@debbugs.gnu.org; Wed, 07 Dec 2022 05:02:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:33700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2rG5-0001ui-Vy for submit@debbugs.gnu.org; Wed, 07 Dec 2022 05:02:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2rG0-0003xW-8p for bug-guile@gnu.org; Wed, 07 Dec 2022 05:02:32 -0500 Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2rFw-0004gZ-Ak for bug-guile@gnu.org; Wed, 07 Dec 2022 05:02:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HXgJjCS9uwQlGTUtrYPV4DdKfkDS3KPTrZxo7LAHRH8=; b=deNpMKzY3QXdRu8Doil5ckx+5g DVr9nn1B8IZs4BCqH5dIbQ04WgluRxGbAc+U/iFhOjzHwocTXJzh8t0/YAmyrsLSDISL9RPfnobZ9 LWFB92TdpgiTHz1Cxg0uNAroUTUSdVE6iw7DWvNGZUAcNVIpCSEwjyICr64kebohNPF8jdU3YDaDT 6Vv1/Yuddm85LfbNJXEF3ccfaawq9Eygr6NBtK351i7hKfPBW5eDkvsotlaV4KKKN8LMwC/lp+It5 cI5LZUsPZto/slh2iyPlVWw6s85rvcUPmvDlS0lC0EAnTMbAh+r/yNGwiWN/rVuH2zkfls21i/DNz /zeyQPAA==; Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1p2rFk-0000Wo-V4 for bug-guile@gnu.org; Wed, 07 Dec 2022 11:02:13 +0100 Date: Wed, 7 Dec 2022 11:02:12 +0100 Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3X4N75xJyFYPxrg6" Content-Disposition: inline In-Reply-To: From: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) --3X4N75xJyFYPxrg6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 07, 2022 at 08:50:09AM +0100, rose gibson via Bug reports for G= UILE, GNU's Ubiquitous Extension Language wrote: > hi, >=20 > i noticed that if i, on my system, run "guile" from a shell and then type= into the command prompt that appears, >=20 > (string-ref "a string" -1) >=20 > guile appears to hang for a few seconds or so, and then prints the messag= e "Segmentation fault (core dumped)". >=20 > i'm not really sure if this report is worth anything, it might just be so= me glitch in my distribution's build or something else unreproducable and w= eird, idk.=C2=A0 but i thought i would say something.=C2=A0 just in case. >=20 > this is with guile 3.0.8 on arch linux.=C2=A0 i didn't do anything specia= l with respect to building guile myself or anything like that, it was (i'm = pretty sure) just installed from the repositories. Hi, this is Debian GNU/Linux, x86_64, but a self-compiled Guile: | tomas@trotzki:~$ guile | GNU Guile 3.0.8.57-bc3b1 | Copyright (C) 1995-2022 Free Software Foundation, Inc. |=20 | Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. | This program is free software, and you are welcome to redistribute it | under certain conditions; type `,show c' for details. |=20 | Enter `,help' for help. | scheme@(guile-user)> (string-ref "a string" -1) | ice-9/boot-9.scm:1685:16: In procedure raise-exception: | Value out of range 0 to< 18446744073709551615: -1 |=20 | Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. | scheme@(guile-user) [1]> =2E.. so it's either fixed in the meantime, or there are differences between our respective builds. Here, the bad index is caught, it seems. > i'm definitely curious what's up if anyone ever bothers to take the time = figuring it out. >=20 > thanks :) That's as much as I can do for now, $DAYJOB calling :) Cheers --=20 t --3X4N75xJyFYPxrg6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY5BknQAKCRAFyCz1etHa RlImAJ9gjhWArAkUkK5gyK7r0b0UA4kweQCfcuLPu+DGX3xVj2Vc4VjCysr/tQ0= =SSXD -----END PGP SIGNATURE----- --3X4N75xJyFYPxrg6-- From unknown Fri Jun 20 07:19:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59874: Segfault from string-ref with negative 'k' Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 07 Dec 2022 10:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59874 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: rose gibson Cc: 59874@debbugs.gnu.org Received: via spool by 59874-submit@debbugs.gnu.org id=B59874.16704090618689 (code B ref 59874); Wed, 07 Dec 2022 10:31:02 +0000 Received: (at 59874) by debbugs.gnu.org; 7 Dec 2022 10:31:01 +0000 Received: from localhost ([127.0.0.1]:49333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2rhc-0002G5-Kn for submit@debbugs.gnu.org; Wed, 07 Dec 2022 05:31:00 -0500 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2rha-0002Fz-PJ for 59874@debbugs.gnu.org; Wed, 07 Dec 2022 05:31:00 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1670409056; cv=none; d=zohomail.com; s=zohoarc; b=n3b2dfbbaSIwy54AvKqzF4mMwN+2xEc8LEkfjaaI3U8Q52FEH58pym5FbiGtPAFCvMScOKzk5ky16C2jtkNQb1k8JbrSLEX8YzB0i6i6xjuP00eQc7XdXXmCrE3+w7rO8oZLGvpltDNDAbKg+XklcdsvUQv/0Tlb4KKrWHbURig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670409056; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=KTDbs3D+GBMQ78kRPTd8vgxxVCAQKLXWrAHtVhKL4io=; b=gakL+/Qal1ddNo6Yn2NcW0JHaHMqTFjfs/N6gA1/43dKg9/P2KYG+So/jbwiqvYrp/FD2YmyNyLmzCQ4mylJbDwZFKMwIh5g9S4LMGJo8U+0R2iSeQU6Uo0tIHwuiNFCrWxJMOgX/rrfuKsxl2p+13HxU7FARVvNJQrR7T9WnRI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670409056; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=KTDbs3D+GBMQ78kRPTd8vgxxVCAQKLXWrAHtVhKL4io=; b=ClZ2mK3KzB4JbTu1No/r7ksGjZarbQNmf3Ftwr/cRznWwhZKdE6avcGwk93I1C8A aPVW/Pr2U87ZJffVmhiam+0sWvPZh5dilcQgXD1irs+PQ/EBdSRFL2LtHzFeRPgfUW4 mpGaIrc/lQRGLwqjCFb9biz9G9E73aSP9S/IzH/0= Received: from localhost (68-110-142-46.pool.kielnet.net [46.142.110.68]) by mx.zohomail.com with SMTPS id 1670409053502367.51270149665197; Wed, 7 Dec 2022 02:30:53 -0800 (PST) References: User-agent: mu4e 1.8.9; emacs 28.1 From: Ricardo Wurmus Date: Wed, 07 Dec 2022 11:29:28 +0100 In-reply-to: X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87sfhrh5et.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External X-Spam-Score: -0.0 (/) 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.0 (-) Thank you for reporting this bug. > i noticed that if i, on my system, run "guile" from a shell and then type into the command prompt that appears, > > (string-ref "a string" -1) > > guile appears to hang for a few seconds or so, and then prints the message "Segmentation fault (core dumped)". I can reproduce this on Guix System with guile 3.0.8: --8<---------------cut here---------------start------------->8--- guile --no-auto-compile --debug GNU Guile 3.0.8 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (string-ref "a string" -1) Segmentation fault --8<---------------cut here---------------end--------------->8--- But: --8<---------------cut here---------------start------------->8--- $ guile -c '(string-ref "a string" -1)' Backtrace: In ice-9/boot-9.scm: 1752:10 6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In unknown file: 5 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 4 (call-with-prompt ("prompt") # #) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/command-line.scm: 185:19 2 (_ #) In unknown file: 1 (eval (string-ref "a string" -1) #) 0 (string-ref "a string" -1) ERROR: In procedure string-ref: Value out of range 0 to< 7: -1 --8<---------------cut here---------------end--------------->8--- -- Ricardo From unknown Fri Jun 20 07:19:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59874: Segfault from string-ref with negative 'k' Resent-From: lloda Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 07 Dec 2022 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59874 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: rose gibson Cc: 59874@debbugs.gnu.org Received: via spool by 59874-submit@debbugs.gnu.org id=B59874.167043569221251 (code B ref 59874); Wed, 07 Dec 2022 17:55:02 +0000 Received: (at 59874) by debbugs.gnu.org; 7 Dec 2022 17:54:52 +0000 Received: from localhost ([127.0.0.1]:51360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2yd9-0005Wh-VZ for submit@debbugs.gnu.org; Wed, 07 Dec 2022 12:54:52 -0500 Received: from mta-05-3.privateemail.com ([68.65.122.15]:17842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2yd6-0005Wb-7i for 59874@debbugs.gnu.org; Wed, 07 Dec 2022 12:54:50 -0500 Received: from mta-05.privateemail.com (localhost [127.0.0.1]) by mta-05.privateemail.com (Postfix) with ESMTP id 36A9218000A1; Wed, 7 Dec 2022 12:54:42 -0500 (EST) Received: from [192.168.1.105] (unknown [51.154.167.214]) by mta-05.privateemail.com (Postfix) with ESMTPA id 8D65618000A0; Wed, 7 Dec 2022 12:54:40 -0500 (EST) From: lloda Message-Id: <8ED96046-97C1-4A6B-8E68-AD0DED6BA3F8@sarc.name> Content-Type: multipart/alternative; boundary="Apple-Mail=_B6831C2B-B3D3-46EE-B20D-BF9C99D86708" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Date: Wed, 7 Dec 2022 18:54:37 +0100 In-Reply-To: References: X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: -0.0 (/) 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.0 (-) --Apple-Mail=_B6831C2B-B3D3-46EE-B20D-BF9C99D86708 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello, This is the same bug as = https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58154 = which is fixed = in git = (http://git.savannah.gnu.org/gitweb/?p=3Dguile.git;a=3Dcommitdiff;h=3Dc000= 4442b7691f59a0e37869ef288eb26382ad9e = ). This bug is quite terrible so hopefully we'll get a new release out = soon. Thank you Daniel --Apple-Mail=_B6831C2B-B3D3-46EE-B20D-BF9C99D86708 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii

Hello,


This bug is quite terrible so hopefully we'll get a new release out soon.

Thank you

  Daniel

--Apple-Mail=_B6831C2B-B3D3-46EE-B20D-BF9C99D86708-- From unknown Fri Jun 20 07:19:56 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59874: Segfault from string-ref with negative 'k' Resent-From: bokr@bokr.com Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 10 Dec 2022 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59874 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Ricardo Wurmus Cc: 59874@debbugs.gnu.org, rose gibson Received: via spool by 59874-submit@debbugs.gnu.org id=B59874.1670687510470 (code B ref 59874); Sat, 10 Dec 2022 15:52:01 +0000 Received: (at 59874) by debbugs.gnu.org; 10 Dec 2022 15:51:50 +0000 Received: from localhost ([127.0.0.1]:43436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p428k-00007R-AT for submit@debbugs.gnu.org; Sat, 10 Dec 2022 10:51:50 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p428e-000079-HH for 59874@debbugs.gnu.org; Sat, 10 Dec 2022 10:51:48 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 8B91767197; Sat, 10 Dec 2022 15:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1670687498; bh=uQ20nLZhKk+NPVcRc0iwSjYOGzmf6dQlK0Pzkt5V6DQ=; h=From:Date:To:Cc:Subject:References:In-Reply-To:From; b=MnOo1m/XelfSkbMI+x/y22HkhXL+6oOMabcXWLME0KvrXBq219UIY4PGCWiFeLW/9 CYYdaELlyIWt/t1eqvT6pmkmxqiNUHRGG71vMtoxnrUS9iTjyeAvHQYzbLwfEUOb7Q K2u7Oy3YdXdHSRQBstPbTQvbwdSZrqEdfUqgI1DbNKdwbjkwhdPfrTnM6hIAr2maHt 5VE8XegdvM85xNNaQXpu6mzuRnNeeSUiL92eQ/EQ7wR2wCt0J4hZssOw+OjFQOyXG0 xunzo/DE7QVWcINjekiAokRneqeYlu8shOdMA/aUDbib6Jq6CHXKE7Q5BLNhHZca+S RjRI0T+diy97g== X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HWnRpzdJb4xV; Sat, 10 Dec 2022 15:51:38 +0000 (UTC) Received: from localhost (m90-129-213-144.cust.tele2.se [90.129.213.144]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 9C514671CA; Sat, 10 Dec 2022 15:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1670687498; bh=uQ20nLZhKk+NPVcRc0iwSjYOGzmf6dQlK0Pzkt5V6DQ=; h=From:Date:To:Cc:Subject:References:In-Reply-To:From; b=MnOo1m/XelfSkbMI+x/y22HkhXL+6oOMabcXWLME0KvrXBq219UIY4PGCWiFeLW/9 CYYdaELlyIWt/t1eqvT6pmkmxqiNUHRGG71vMtoxnrUS9iTjyeAvHQYzbLwfEUOb7Q K2u7Oy3YdXdHSRQBstPbTQvbwdSZrqEdfUqgI1DbNKdwbjkwhdPfrTnM6hIAr2maHt 5VE8XegdvM85xNNaQXpu6mzuRnNeeSUiL92eQ/EQ7wR2wCt0J4hZssOw+OjFQOyXG0 xunzo/DE7QVWcINjekiAokRneqeYlu8shOdMA/aUDbib6Jq6CHXKE7Q5BLNhHZca+S RjRI0T+diy97g== From: bokr@bokr.com Date: Sat, 10 Dec 2022 16:51:21 +0100 Message-ID: <20221210155121.GA16950@LionPure> References: <87sfhrh5et.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87sfhrh5et.fsf@elephly.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -2.3 (--) 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: -3.3 (---) HI, On +2022-12-07 11:29:28 +0100, Ricardo Wurmus wrote: > Thank you for reporting this bug. > > > i noticed that if i, on my system, run "guile" from a shell and then type into the command prompt that appears, > > > > (string-ref "a string" -1) > > > > guile appears to hang for a few seconds or so, and then prints the message "Segmentation fault (core dumped)". > > I can reproduce this on Guix System with guile 3.0.8: > > --8<---------------cut here---------------start------------->8--- > guile --no-auto-compile --debug > GNU Guile 3.0.8 > Copyright (C) 1995-2021 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> (string-ref "a string" -1) > Segmentation fault > --8<---------------cut here---------------end--------------->8--- > > But: > > --8<---------------cut here---------------start------------->8--- > $ guile -c '(string-ref "a string" -1)' > Backtrace: > In ice-9/boot-9.scm: > 1752:10 6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) > In unknown file: > 5 (apply-smob/0 #) > In ice-9/boot-9.scm: > 724:2 4 (call-with-prompt ("prompt") # #) > In ice-9/eval.scm: > 619:8 3 (_ #(#(#))) > In ice-9/command-line.scm: > 185:19 2 (_ #) > In unknown file: > 1 (eval (string-ref "a string" -1) #) > 0 (string-ref "a string" -1) > > ERROR: In procedure string-ref: > Value out of range 0 to< 7: -1 > --8<---------------cut here---------------end--------------->8--- > > -- > Ricardo > > > M-x guiler from emacs editing this reply, produced this: --8<---------------cut here---------------start------------->8--- Current directory is ~/.mutt/ezTemp/ GNU Guile 2.2.4 Copyright (C) 1995-2017 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (string-ref "a string" -1) :1:0: Value out of range 0 to 18446744073709551615: -1 Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> --8<---------------cut here---------------end--------------->8--- The range number is not as nice as measuring the input string :) (64-bit unsigned maxint in case not immediately recognized ) --8<---------------cut here---------------start------------->8--- scheme@(guile-user) [1]> (- (expt 2 64) 1) $3 = 18446744073709551615 --8<---------------cut here---------------end--------------->8--- I am on puri.sm pureOS amber (old ;/) --8<---------------cut here---------------start------------->8--- scheme@(guile-user) [1]> (system "uname -rv") 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) --8<---------------cut here---------------end--------------->8--- M! guile --version (direct from here, not via geiser): --8<---------------cut here---------------start------------->8--- guile (GNU Guile) 2.2.4 Packaged by Debian (2.2.4-deb+1-2+deb10u1) Copyright (C) 2018 Free Software Foundation, Inc. License LGPLv3+: GNU LGPL 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. --8<---------------cut here---------------end--------------->8--- Interestingly, M! and paste the following direct from here does measure the input string: guile --no-auto-compile -c '(display (string-ref "a string" -1))'|& cat -n --8<---------------cut here---------------start------------->8--- 1 Backtrace: 2 6 (apply-smob/1 #) 3 In ice-9/boot-9.scm: 4 705:2 5 (call-with-prompt ("prompt") # …) 5 In ice-9/eval.scm: 6 619:8 4 (_ #(#(#))) 7 In ice-9/command-line.scm: 8 181:18 3 (_ #) 9 In unknown file: 10 2 (eval (display (string-ref "a string" -1)) #) 11 In ice-9/eval.scm: 12 191:35 1 (_ #f) 13 In unknown file: 14 0 (string-ref "a string" -1) 15 16 ERROR: In procedure string-ref: 17 Value out of range 0 to 7: -1 --8<---------------cut here---------------end--------------->8--- HTH, no more time for pleasant procrastinations :) -- Regards, Bengt Richter From unknown Fri Jun 20 07:19:56 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: rose gibson Subject: bug#59874: closed (Re: bug#59874: Segfault from string-ref with negative 'k') Message-ID: References: <33b05001-b574-fc32-ddde-611ba98436bc@abou-samra.fr> X-Gnu-PR-Message: they-closed 59874 X-Gnu-PR-Package: guile Reply-To: 59874@debbugs.gnu.org Date: Mon, 12 Dec 2022 06:27:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1670826422-2578-1" This is a multi-part message in MIME format... ------------=_1670826422-2578-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #59874: Segfault from string-ref with negative 'k' which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 59874@debbugs.gnu.org. --=20 59874: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59874 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1670826422-2578-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 59874-close) by debbugs.gnu.org; 12 Dec 2022 06:26:44 +0000 Received: from localhost ([127.0.0.1]:50740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4cGx-0000fJ-Tn for submit@debbugs.gnu.org; Mon, 12 Dec 2022 01:26:44 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:35441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4cGv-0000fD-Dm for 59874-close@debbugs.gnu.org; Mon, 12 Dec 2022 01:26:43 -0500 Received: from [10.188.149.104] ([46.193.67.184]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.168]) with ESMTPSA (Nemesis) id 1M5fZ4-1p1sRN2aN8-007BY7 for <59874-close@debbugs.gnu.org>; Mon, 12 Dec 2022 07:26:35 +0100 Message-ID: <33b05001-b574-fc32-ddde-611ba98436bc@abou-samra.fr> Date: Mon, 12 Dec 2022 07:26:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: bug#59874: Segfault from string-ref with negative 'k' Content-Language: en-US To: 59874-close@debbugs.gnu.org References: <87sfhrh5et.fsf@elephly.net> <20221210155121.GA16950@LionPure> From: Jean Abou Samra In-Reply-To: <20221210155121.GA16950@LionPure> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------GUQag0UhqOfQoub2mujiBzHX" X-Provags-ID: V03:K1:JfS9agzt4vwcGYVrqHyr2l0qoHS4CqNzlqUf80Xsum0GOyOLU7c fxngYbPb+TKTFXgOoJVL0N26sUD2NOuTjCN0AeZp4QMXrg/PzMNJ+wlCLMuw8bGsJNQSMZP WHvh8hUu7GFkWcELuqVJWeAyF0oN1w7NDmZ0m4yl6irsRn3vduZWMCIhPLf9XccFAnht+SY sjAeFeaTDHeJNCNZe9IfQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:U0mJM7cvOro=;qIeW8ze5hepULt+cEP04cTzixjh 96bOG1Diz1uuyqltCI0fOuzH6BpNwXUycUoPNR93sS4yL6/8jm0aDNw5on/jgzToCMcrKNptA BuXuyU4hMUDyhdYRy8MSib0AE6Zleois0al6p7yIMi65xeo8L1cVw/brUp5be+eIuL5gA6K7I NIdeHC7TQtUKNpv2Xe2cpAB08dzX5O3MiMEB0FHrnlDMWiT77ca0kege5jzezdzVd4tbOAz7r 55bUPXhlQjDIEANobOq4mSd0UD3sQ+jhhUawyK6Uh95Kt7TYEiwEnhP3Iv+ia/ou8BAPvrSlP UqMJys1cHQLWl5TbW9kjJQi4w3nSr2KncdBxOwIundwdyjeXjW9lwrSqkHMHyN9z5+DV1WBAd Dm6SNMdCeakO0eCYhNze3+yMHX+ayuYQKg70BACD9JNVAmTyMgpDaY1ZBBCfYFpH85p4tWRDH KIFpPK6s7aVM+YywF1hiZgrRz3QgXddLAEu7I5Se0Ohxw+zZrvLHO2yZghx9G7dkYoSbxdnl7 +6kif1lAOzBcCykIpY5z3/d9ukvsz2WHhYNwuEd5v9kayag3rIjGh1cfup9GyyeS6VSOC7PAM jDIproE8XX0cSc9URlCUYR3JlrU9vXf4yIc4YbyrDJaPNmRVWCe/XYGbps5CJ4v7eDMlON0Bl 6yodpjTeG44NgZpCr5m7qSgwIz0R3TcLbvMqjk8xmw== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59874-close 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.0 (-) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------GUQag0UhqOfQoub2mujiBzHX Content-Type: multipart/mixed; boundary="------------9oThRS0ZON1yhKAAj0yUMG5w"; protected-headers="v1" From: Jean Abou Samra To: 59874-close@debbugs.gnu.org Message-ID: <33b05001-b574-fc32-ddde-611ba98436bc@abou-samra.fr> Subject: Re: bug#59874: Segfault from string-ref with negative 'k' References: <87sfhrh5et.fsf@elephly.net> <20221210155121.GA16950@LionPure> In-Reply-To: <20221210155121.GA16950@LionPure> --------------9oThRS0ZON1yhKAAj0yUMG5w Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 KENsb3Npbmcgc2luY2UgdGhpcyBoYXMgYmVlbiBmaXhlZC4pDQoNCg== --------------9oThRS0ZON1yhKAAj0yUMG5w-- --------------GUQag0UhqOfQoub2mujiBzHX Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQSZ7TKxnKGyBvBjzBmj8PYLiTOX/gUCY5bJmwUDAAAAAAAKCRCj8PYLiTOX/lH4 AQCy4WBF6zUADlCzQ4TrQFneV0ZOiSv7mBNXtqJYN5jfIwEA+V06coGkmKvD8n8zFuKMuJlG+1Z4 LO5L2cdYdaMXJgA= =yt/l -----END PGP SIGNATURE----- --------------GUQag0UhqOfQoub2mujiBzHX-- ------------=_1670826422-2578-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Dec 2022 09:18:03 +0000 Received: from localhost ([127.0.0.1]:48719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2qYy-0001J8-Qt for submit@debbugs.gnu.org; Wed, 07 Dec 2022 04:18:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:36740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2pCQ-0000S4-2q for submit@debbugs.gnu.org; Wed, 07 Dec 2022 02:50:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2pC3-00036S-He for bug-guile@gnu.org; Wed, 07 Dec 2022 02:50:27 -0500 Received: from w1.tutanota.de ([81.3.6.162]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2pC1-0005tn-Rc for bug-guile@gnu.org; Wed, 07 Dec 2022 02:50:15 -0500 Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 61FC3FBF534 for ; Wed, 7 Dec 2022 07:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670399409; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=GAn2quD/A0FgTT87F6XEEXwYE2vYP53abDsDwpXUVKU=; b=KCOegNwe3nI0wxD0HPln/6eM6vsPZ7qzm+ADI4LgCVNLzFHWAEgFGWTA5yf0rsnc 2VnSW181IkuwcK7GC79R42N9PsL0jdgcsGLe+JPTg85WZwoF2RDv3dVWrL+vOSlLVrZ RlnaYqwd97B5e1UERlGkRiY5EM70wiEmK/uDybV8zGnq1c8njQlRm/tyHDTM1b1gTB6 WCIn11dWhDOMVXUXiS3qakHAwSGYl9zMODwZsSKg5uKhLpw0185boZSlgLl4Syl8g1F 57mMN60vHO9TEJBkrNoCLwjymi5FXqsQqATB3qevGvGZuT7spLLbUnJWuhGEEk9wc0C /m/vFmqMaw== Date: Wed, 7 Dec 2022 08:50:09 +0100 (CET) From: rose gibson To: "\"Guile Bug Reports\"" Message-ID: Subject: Segfault from string-ref with negative 'k' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=81.3.6.162; envelope-from=birdswinter@tutanota.com; helo=w1.tutanota.de 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 07 Dec 2022 04:17:59 -0500 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: -2.4 (--) hi, i noticed that if i, on my system, run "guile" from a shell and then type i= nto the command prompt that appears, (string-ref "a string" -1) guile appears to hang for a few seconds or so, and then prints the message = "Segmentation fault (core dumped)". i'm not really sure if this report is worth anything, it might just be some= glitch in my distribution's build or something else unreproducable and wei= rd, idk.=C2=A0 but i thought i would say something.=C2=A0 just in case. this is with guile 3.0.8 on arch linux.=C2=A0 i didn't do anything special = with respect to building guile myself or anything like that, it was (i'm pr= etty sure) just installed from the repositories. i'm definitely curious what's up if anyone ever bothers to take the time fi= guring it out. thanks :) ------------=_1670826422-2578-1--