‘spawn’ crashes when passed a non-file port

  • Done
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 26 Jan 2023 09:30
(address . bug-guile@gnu.org)
874jsdsnoe.fsf@inria.fr
Here’s an example:

Toggle snippet (13 lines)
$ ./meta/guile
GNU Guile 3.0.9
Copyright (C) 1995-2023 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)> (with-error-to-port (%make-void-port "w") (lambda () (spawn "date" (list "date"))))
Segmentation fault

This is due to the careless use of ‘SCM_FPORT_FDES’ there.

Ludo’.
L
L
Ludovic Courtès wrote on 26 Jan 2023 09:45
(address . 61073-done@debbugs.gnu.org)
87y1ppr8eo.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (16 lines)
> Here’s an example:
>
> $ ./meta/guile
> GNU Guile 3.0.9
> Copyright (C) 1995-2023 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)> (with-error-to-port (%make-void-port "w") (lambda () (spawn "date" (list "date"))))
> Segmentation fault
>
> This is due to the careless use of ‘SCM_FPORT_FDES’ there.

Fixed in 5b42f8c154906584455a4989038406c88b723cb0.

Ludo’.
Closed
?