sb-posix:tcsetattr segfaults on OpenBSD
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
$ sbcl --version
SBCL 2.2.5.openbsd
$ uname -a
OpenBSD gilva.local 7.2 GENERIC.MP#2 amd64
Test case
(require 'sb-posix)
(defun invoke-
(let ((fd (sb-sys:
(if (zerop (sb-unix:
(funcall thunk)
(let ((termios (sb-posix:tcgetattr fd)))
(setf (sb-posix:
(funcall thunk)
(setf (sb-posix:
(defmacro with-echoing-
`(invoke-
$ sbcl --load test.lisp --eval '(with-
Expected behavior: I type a form which is not echoed, but is printed when I press enter.
Observed behavior: sbcl exits immediately.
When I ktrace the above invocation, I can see the tcgetattr call succeed, but there's a SEGV where the tcsetattr trace should appear.
Note that the same code works as intended running on the sbcl packaged for Ubuntu:
$ sbcl --version
SBCL 2.1.11.debian
$ uname -a
Linux dlamkins-0316 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux