ack/plat/pdpv7/libsys
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
..
_alarm.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
_close.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
_creat.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
_dup.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
_execl.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
_exit.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
_fork.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
_fstat.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
_ftime.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
_getpid.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
_gtty.c Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
_ioctl.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
_kill.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
_link.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
_lseek.s
_open.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
_pause.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
_pipe.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
_read.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
_sbrk.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
_unlink.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
_wait.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
_write.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
access.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
acct.s
alarm.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.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
chdir.s
chmod.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
chown.s
chroot.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
cleanup.c Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
close.s
creat.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
dup.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
errno.s
execl.s
execle.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
execv.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
execve.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
exit.c Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
fetchi.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
fork.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
fperr.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
fstat.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
ftime.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
getgid.s
getgrp.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
getpid.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
getppid.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
getuid.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
gldav.s
gtty.c Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
ioctl.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
isatty.c Prevent crash in isatty() 2018-06-15 00:48:29 -04:00
kill.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
killbkg.s
killpg.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
link.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
lock.s
login.s
lseek.s
lstat.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
mknod.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
mount.s
mpxcall.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
nice.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
nostk.s
open.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
pause.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
phys.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
pipe.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
profil.s
ptrace.s
qfstat.s
qstat.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
quota.s
read.s
readlink.s
reboot.s
renice.s
rtp.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
sbrk.s
setgid.s
setgrp.s
setuid.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
signal.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
stat.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
stime.s
stty.c Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
submit.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
symlink.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
sync.s
sys.h Made the cgg and the cg code generator work; use this to beat the PDP/11 2018-02-23 22:31:46 +01:00
time.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
times.s
ucall.s
umask.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
umount.s
unlink.s
utime.s
vfork.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
vhangup.s
wait.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
write.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