Subject: ‘spawn’ crashes when passed a non-file port
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Thu, 26 Jan 2023 09:30:25 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Here’s an example:

--8<---------------cut here---------------start------------->8---
$ ./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
--8<---------------cut here---------------end--------------->8---

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

Ludo’.