bug#59874: Segfault from string-ref with negative 'k'

2022-12-07 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
hi,

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'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 weird, 
idk.  but i thought i would say something.  just in case.

this is with guile 3.0.8 on arch linux.  i didn't do anything special with 
respect to building guile myself or anything like that, it was (i'm pretty 
sure) just installed from the repositories.

i'm definitely curious what's up if anyone ever bothers to take the time 
figuring it out.

thanks :)





bug#59874: Segfault from string-ref with negative 'k'

2022-12-07 Thread tomas
On Wed, Dec 07, 2022 at 08:50:09AM +0100, rose gibson via Bug reports for 
GUILE, GNU's Ubiquitous Extension Language wrote:
> hi,
> 
> 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'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 weird, 
> idk.  but i thought i would say something.  just in case.
> 
> this is with guile 3.0.8 on arch linux.  i didn't do anything special 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.
| 
| 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)
| ice-9/boot-9.scm:1685:16: In procedure raise-exception:
| 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]>

... 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.
> 
> thanks :)

That's as much as I can do for now, $DAYJOB calling :)

Cheers
-- 
t


signature.asc
Description: PGP signature


bug#59874: Segfault from string-ref with negative 'k'

2022-12-07 Thread Ricardo Wurmus
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





bug#59874: Segfault from string-ref with negative 'k'

2022-12-07 Thread lloda

Hello,

This is the same bug as https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58154 
 which is fixed in git 
(http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=c0004442b7691f59a0e37869ef288eb26382ad9e
 
).

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

Thank you

  Daniel



bug#49686: Confusing presence of #f in error message

2022-12-07 Thread Jean Abou Samra
This seems to have been fixed, probably in 
eb5ecf4944cd646341f7e47dda5396cf96a4b8a3.


OpenPGP_signature
Description: OpenPGP digital signature