From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#25498: Crash in open-file; patch attached Date: Sat, 11 Feb 2017 22:10:49 +0100 Message-ID: <87r3341lie.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1486847533 8096 195.159.176.226 (11 Feb 2017 21:12:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2017 21:12:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 25498@debbugs.gnu.org To: Linas Vepstas Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Feb 11 22:12:08 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccexk-0001go-08 for guile-bugs@m.gmane.org; Sat, 11 Feb 2017 22:12:08 +0100 Original-Received: from localhost ([::1]:49612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccexo-0001Ny-2H for guile-bugs@m.gmane.org; Sat, 11 Feb 2017 16:12:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccexh-0001LM-G7 for bug-guile@gnu.org; Sat, 11 Feb 2017 16:12:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccexe-0003Fi-Bz for bug-guile@gnu.org; Sat, 11 Feb 2017 16:12:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccexe-0003Fe-87 for bug-guile@gnu.org; Sat, 11 Feb 2017 16:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ccexe-0005yF-2W for bug-guile@gnu.org; Sat, 11 Feb 2017 16:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 11 Feb 2017 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25498 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 25498-submit@debbugs.gnu.org id=B25498.148684746222864 (code B ref 25498); Sat, 11 Feb 2017 21:12:02 +0000 Original-Received: (at 25498) by debbugs.gnu.org; 11 Feb 2017 21:11:02 +0000 Original-Received: from localhost ([127.0.0.1]:35958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccewg-0005wh-0R for submit@debbugs.gnu.org; Sat, 11 Feb 2017 16:11:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccewe-0005wE-RR for 25498@debbugs.gnu.org; Sat, 11 Feb 2017 16:11:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccewW-00038c-GQ for 25498@debbugs.gnu.org; Sat, 11 Feb 2017 16:10:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccewW-00038X-Ch; Sat, 11 Feb 2017 16:10:52 -0500 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]:52396 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ccewV-0000zK-Oc; Sat, 11 Feb 2017 16:10:52 -0500 In-Reply-To: (Linas Vepstas's message of "Fri, 20 Jan 2017 18:34:38 -0600") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8533 Archived-At: Hi Linas, Linas Vepstas skribis: > The following crashes instantly; I used single-quotes by accident. > > (open-file "/tmp/lg" 'w') > > Stack: > > Enter `,help' for help. > scheme@(guile-user)> (open-file "/tmp/lg" 'w') > > Thread 1 "guile" received signal SIGSEGV, Segmentation fault. > scm_i_mode_to_open_flags (mode=3Dmode@entry=3D0x555555ac5660, > is_binary=3Dis_binary@entry=3D0x7fffffffd46c, > FUNC_NAME=3DFUNC_NAME@entry=3D0x7ffff7b89a7d "open-file") > at ../../libguile/fports.c:168 What version of Guile are you using? With 2.0.13, I get: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (open-file "/tmp/lg" 'w') ERROR: In procedure open-file: ERROR: In procedure open-file: Value out of range: w' --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99.