From owner-freebsd-bugs Fri Sep 19 02:51:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA29639 for bugs-outgoing; Fri, 19 Sep 1997 02:51:54 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.26]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA29614; Fri, 19 Sep 1997 02:51:44 -0700 (PDT) Received: from critter.freebsd.dk (localhost.cybercity.dk [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.7) with ESMTP id LAA13120; Fri, 19 Sep 1997 11:50:34 +0200 (CEST) To: Bruce Evans cc: grog@lemis.com, peter@spinner.dialix.com.au, atrens@nortel.ca, freebsd-bugs@freebsd.org, gram@cdsec.com, hackers@freebsd.org Subject: Re: Bug in malloc/free In-reply-to: Your message of "Fri, 19 Sep 1997 19:09:04 +1000." <199709190909.TAA09952@godzilla.zeta.org.au> Date: Fri, 19 Sep 1997 11:50:34 +0200 Message-ID: <13118.874662634@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In message <199709190909.TAA09952@godzilla.zeta.org.au>, Bruce Evans writes: >> On the other hand, there's not much you can do without calling some >> library routine. POSIX.1 defines "safe" routines that you can call >> from a signal handler. They are: >> >> _exit access alarm cfgetispeed cfgetospeed cfsetispeed cfsetospeed >> chdir chmod chown close creat dup dup2 execle execve fcntl fork >> fstat getegid geteuid getgid getgroups getpgrp getpid getppid getuid >> kill link lseek mkdir mkfifo open pathconf pause pipe read rename >> rmdir setgid setpgid setsid setuid sigaction sigaddset sigdelset >> sigemptyset sigfillset sigismember sigpending sigprocmask sigsuspend >> sleep stat sysconf tcdrain tcflow tcflush tcgetattr tcgetpgrp >> tcsendbreak tcsetattr tcsetpgrp time times umask uname unlink utime >> wait waitpid write >> >> In addition, System V.4 allows abort, exit, longjmp, and signal. >> >>Should we produce some such guidelines? > >We claim to be sort of POSIX conformant. Perhaps this is enough. We >aren't actually POSIX conformant. All the above "safe" routines may >clobber the global `errno'. > >STDC only allows operations on auto variables and assignment to static >variables of type sig_atomic_t. We aren't STDC conformant either. >Operations on auto floating point variables may corrupt the floating >point state. This isn't a problem in practice, since nothing useful >can be done using only auto floating point variables. You could calculate pi... :-) -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop."