ack/plat/pdpv7
George Koehler 5db312a1c0 Prevent crash in isatty()
The existing code allocated 2 bytes (char*), but gtty() needs 6 bytes
(struct sgttyb), so isatty() smashed the stack and corrupted its
return address, probably causing SIGBUS or SIGSEGV.

Fix by switching to TIOCGETD, which needs 2 bytes.  TIOCGETD isn't in
the manual for tty(4), but does appear in
https://minnie.tuhs.org//cgi-bin/utree.pl?file=V7/usr/sys/dev/tty.c

This fixes hilo_c.pdpv7 and hilo_mod.pdpv7 in simh-pdp11.
2018-06-15 00:48:29 -04:00
..
include Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
libsys Prevent crash in isatty() 2018-06-15 00:48:29 -04:00
boot.s Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
build-pkg.lua Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
build-tools.lua Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
descr Use 2-byte alignment in pdpv7 to prevent SIGBUS. 2018-06-15 00:17:12 -04:00