From owner-freebsd-current Tue Sep 8 11:30:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA19218 for freebsd-current-outgoing; Tue, 8 Sep 1998 11:30:08 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA19102 for ; Tue, 8 Sep 1998 11:29:58 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id LAA18291; Tue, 8 Sep 1998 11:29:53 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp03.primenet.com, id smtpd018234; Tue Sep 8 11:29:46 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA03403; Tue, 8 Sep 1998 11:29:40 -0700 (MST) From: Terry Lambert Message-Id: <199809081829.LAA03403@usr07.primenet.com> Subject: Re: free() called recursively To: phk@critter.freebsd.dk (Poul-Henning Kamp) Date: Tue, 8 Sep 1998 18:29:40 +0000 (GMT) Cc: info@highwind.com, freebsd-current@FreeBSD.ORG In-Reply-To: <26273.905200961@critter.freebsd.dk> from "Poul-Henning Kamp" at Sep 7, 98 10:42:41 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >How bad is it to get this: > > "t_activefile in free(): warning: recursive call." > > bad. It means that you're trying to malloc in a signal handler > (99.9% of the cases), which isn't really allowed... This is really badly documented in FreeBSD. The following section should really be on the sigaction(2) man page, but is not: ] The following table defines a set of interfaces that are either ] reentrant or not interruptible by signals and are async-signal ] safe. Therefore applications may invoke them, without restriction, ] from signal-catching functions: ] ] Base Interfaces ] ] _exit() access() alarm() cfgetispeed() cfgetospeed() cfsetispeed() ] cfsetospeed() chdir() chmod() chown() close() creat() dup() dup2() ] execle() execve() fcntl() fork() fpathconf() fstat() fsync() ] getegid() geteuid() getgid() getgroups() getpgrp() getpid() ] getppid() getuid() kill() link() lseek() mkdir() mkfifo() open() ] pathconf() pause() pipe() raise() read() rename() rmdir() setgid() ] setpgid() setsid() setuid() sigaction() sigaddset() sigdelset() ] sigemptyset() sigfillset () sigismember() signal() sigpending() ] sigprocmask() sigsuspend() sleep() stat() sysconf() tcdrain() ] tcflow() tcflush() tcgetattr() tcgetpgrp() tcsendbreak() ] tcsetattr() tcsetpgrp() time() times() umask() uname() unlink() ] utime() wait() waitpid() write() ] ] Realtime Interfaces ] ] aio_error() clock_gettime() sigpause() timer_getoverrun() ] aio_return() fdatasync() sigqueue() timer_gettime() aio_suspend() ] sem_post() sigset() timer_settime() ] ] ] All functions not in the above table are considered to be unsafe ] with respect to signals. In the presence of signals, all functions ] defined by this specification will behave as defined when called ] from or interrupted by a signal-catching function, the behaviour is ] undefined. Notice: no "sbrk()"... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message