GNU bug report logs - #26013
(srfi srfi-37) chokes on empty string parameter

Previous Next

Package: guile;

Reported by: Thomas Danckaert <post <at> thomasdanckaert.be>

Date: Tue, 7 Mar 2017 15:36:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> igalia.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Thomas Danckaert <post <at> thomasdanckaert.be>
Subject: bug#26013: closed (Re: bug#26013: (srfi srfi-37) chokes on empty
 string parameter)
Date: Thu, 20 Apr 2017 09:00:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#26013: (srfi srfi-37) chokes on empty string parameter

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 26013 <at> debbugs.gnu.org.

-- 
26013: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26013
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> igalia.com>
To: Thomas Danckaert <post <at> thomasdanckaert.be>
Cc: 26013-done <at> debbugs.gnu.org, ludo <at> gnu.org
Subject: Re: bug#26013: (srfi srfi-37) chokes on empty string parameter
Date: Thu, 20 Apr 2017 10:59:47 +0200
On Wed 19 Apr 2017 18:32, Thomas Danckaert <post <at> thomasdanckaert.be> writes:

>> On Tue 07 Mar 2017 16:34, Thomas Danckaert <post <at> thomasdanckaert.be>
>> writes:
>>
>>> It looks like Guile's srfi-37 implementation doesn't process empty
>>> string arguments correctly.
> I don't fully understand the code in srfi-37.scm, but I think the fix
> can be as simple as the attached patch (i.e. first check if the argument
> is empty, otherwise check if it starts with \#-).

Applied, thanks :)

Andy

[Message part 3 (message/rfc822, inline)]
From: Thomas Danckaert <post <at> thomasdanckaert.be>
To: bug-guile <at> gnu.org
Subject: (srfi srfi-37) chokes on empty string parameter
Date: Tue, 07 Mar 2017 16:34:54 +0100 (CET)
Hello Guilers,

It looks like Guile's srfi-37 implementation doesn't process empty 
string arguments correctly.  For example, here's a stacktrace I get 
when executing guix system list-generations "":

$ guix system list-generations ""
Backtrace:
In ice-9/boot-9.scm:
 160: 15 [catch #t #<catch-closure 188c1c0> ...]
In unknown file:
   ?: 14 [apply-smob/1 #<catch-closure 188c1c0>]
In ice-9/boot-9.scm:
  66: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 12 [eval # #]
In ice-9/boot-9.scm:
2404: 11 [save-module-excursion #<procedure 18af900 at 
ice-9/boot-9.scm:4051:3 ()>]
4056: 10 [#<procedure 18af900 at ice-9/boot-9.scm:4051:3 ()>]
1727: 9 [%start-stack load-stack ...]
1732: 8 [#<procedure 18c3b70 ()>]
In unknown file:
   ?: 7 [primitive-load 
"/gnu/store/hnbqdmfh1bwma8nmpai6ci76h5j6bl7j-guix-0.12.0-4.d9da/bin/.guix-real"]
In guix/ui.scm:
1228: 6 [run-guix-command system "list-generations" ""]
In ice-9/boot-9.scm:
 160: 5 [catch srfi-34 #<procedure 47e1580 at guix/ui.scm:432:2 ()> 
...]
 160: 4 [catch system-error ...]
In guix/scripts/system.scm:
 947: 3 [#<procedure 47e2b10 at guix/scripts/system.scm:946:2 ()>]
In ice-9/boot-9.scm:
 160: 2 [catch misc-error #<procedure 47e4c00 at 
guix/scripts.scm:48:4 ()> ...]
In srfi/srfi-37.scm:
 220: 1 [next-arg]
In unknown file:
   ?: 0 [string-ref "" 0]

ERROR: In procedure string-ref:
ERROR: Value out of range: 0

cheers,

Thomas



This bug report was last modified 8 years and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.