From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.bugs Subject: bug#25498: Crash in open-file; patch attached Date: Wed, 15 Feb 2017 02:25:40 -0600 Message-ID: References: <87r3341lie.fsf@gnu.org> Reply-To: linasvepstas@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114fcf9c3fbcf705488d6e64 X-Trace: blaine.gmane.org 1487147238 32670 195.159.176.226 (15 Feb 2017 08:27:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2017 08:27:18 +0000 (UTC) Cc: 25498@debbugs.gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Feb 15 09:27:14 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 1cduvZ-0007fr-Ce for guile-bugs@m.gmane.org; Wed, 15 Feb 2017 09:27:05 +0100 Original-Received: from localhost ([::1]:39007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cduve-0005Jo-Vs for guile-bugs@m.gmane.org; Wed, 15 Feb 2017 03:27:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cduvZ-0005EP-K6 for bug-guile@gnu.org; Wed, 15 Feb 2017 03:27:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cduvW-0004Gy-Bg for bug-guile@gnu.org; Wed, 15 Feb 2017 03:27:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42257) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cduvW-0004Gu-8A for bug-guile@gnu.org; Wed, 15 Feb 2017 03:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cduvW-0002ji-1f for bug-guile@gnu.org; Wed, 15 Feb 2017 03:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 15 Feb 2017 08:27:01 +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: moreinfo Original-Received: via spool by 25498-submit@debbugs.gnu.org id=B25498.148714716810453 (code B ref 25498); Wed, 15 Feb 2017 08:27:01 +0000 Original-Received: (at 25498) by debbugs.gnu.org; 15 Feb 2017 08:26:08 +0000 Original-Received: from localhost ([127.0.0.1]:40456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cduud-0002iX-QA for submit@debbugs.gnu.org; Wed, 15 Feb 2017 03:26:08 -0500 Original-Received: from mail-qt0-f179.google.com ([209.85.216.179]:32777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cduuc-0002i1-CX for 25498@debbugs.gnu.org; Wed, 15 Feb 2017 03:26:06 -0500 Original-Received: by mail-qt0-f179.google.com with SMTP id v23so131399121qtb.0 for <25498@debbugs.gnu.org>; Wed, 15 Feb 2017 00:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qjX5u/dC5LLvG5RS+iea8pqyc/yLsmh/tNWsuCSLpso=; b=UzO6+4URb6cu580AMJBeUsXbAfPlgospvMAvT81ygk7mpr/d4YWViM/QA0ufHetckW ZI71Fd3n025nrJyaYWFvvTRfd7VK8AZbszSKQT1wP8MgEwzipjWqoS1gDHHaGOtGPt6A SuIh6nqMwyNcVnHObs50W1CAjro4GfjNJPi6hF5Hd428PnBWCN8ujyyIOqJdCayNov/X f0yBObwkTKHoAB+KE6/zeTpU0/LR0TrpVtnmpe4CvX5DlxPRQeL6Pn50ishiHzDitdNu JsN4s+LJt/wif/yNMcpJr5znE1qxwMfsd7i6TVOA44kiwGg1Sd4/yUzlNL+OdZwNvzmJ dTFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=qjX5u/dC5LLvG5RS+iea8pqyc/yLsmh/tNWsuCSLpso=; b=WrX4vx4r3Jdlq/mN6cwLurAYzAy5BBy1qfq1BsRgOgc8jNLx4az3GOtsq8IUaPKJ73 4QPrLaXbABtLGI929jWRHNy9xpOTX1nNKlJYcQn98na6WH7b2aQKZ8kjHGnptRp7KO47 qHdcq5yoyM3vEstypB5U45ymylInwLmtz5i3Y23hLpZsiUve0DQYX/LD6wUklC3MAmN6 6mD9DxQs3xwfMHpVTz+ULcq5DOcIICVFmi6D4n7X+2HT7qGpR24cq4jrAfUa8cLvccpY ltpmrUyai/dW7COObB2SGUGJ8AEskbGLZcCaogxPQWh5WuLI+H8FXSNcbP5mfUnWPAe0 feVw== X-Gm-Message-State: AMke39lCCax6tc+5R28sFfz15NeQ6luKVmRKwwUNoiH9KJFlxvI+xgzv+iTIx1dyHrR20RgU7+4yqMNiI2BHpA== X-Received: by 10.200.57.199 with SMTP id v65mr31218410qte.13.1487147160810; Wed, 15 Feb 2017 00:26:00 -0800 (PST) Original-Received: by 10.12.174.231 with HTTP; Wed, 15 Feb 2017 00:25:40 -0800 (PST) In-Reply-To: <87r3341lie.fsf@gnu.org> 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:8544 Archived-At: --001a114fcf9c3fbcf705488d6e64 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm using version 2.1 pulled from git, maybe a few days or week before the bug was opened. On Sat, Feb 11, 2017 at 3:10 PM, Ludovic Court=C3=A8s wrote: > 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. > --001a114fcf9c3fbcf705488d6e64 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm using version 2.1 pulled from git, maybe a few day= s or week before the bug was opened.
<= br>
On Sat, Feb 11, 2017 at 3:10 PM, Ludovic Cour= t=C3=A8s <ludo@gnu.org> wrote:
= Hi Linas,

Linas Vepstas <linasvepstas@gm= ail.com> 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,
>=C2=A0 =C2=A0 =C2=A0is_binary=3Dis_binary@entry=3D0x7fffffffd46c,<= br> >=C2=A0 =C2=A0 =C2=A0FUNC_NAME=3DFUNC_NAME@entry=3D0x7ffff7b89a7d &= quot;open-file")
>=C2=A0 =C2=A0 =C2=A0at ../../libguile/fports.c:168

What version of Guile are you using?=C2=A0 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.

--001a114fcf9c3fbcf705488d6e64--