bug#25498: Crash in open-file; patch attached

2017-02-15 Thread Linas Vepstas
Specifically, this crashes, now: GNU Guile 2.1.6.10-710eb



On Wed, Feb 15, 2017 at 2:25 AM, Linas Vepstas 
wrote:

> 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ès  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=mode@entry=0x55ac5660,
>> > is_binary=is_binary@entry=0x7fffd46c,
>> > FUNC_NAME=FUNC_NAME@entry=0x77b89a7d "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’.
>>
>
>


bug#25498: Crash in open-file; patch attached

2017-02-15 Thread Linas Vepstas
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ès  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=mode@entry=0x55ac5660,
> > is_binary=is_binary@entry=0x7fffd46c,
> > FUNC_NAME=FUNC_NAME@entry=0x77b89a7d "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’.
>