Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 1998 18:29:40 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        phk@critter.freebsd.dk (Poul-Henning Kamp)
Cc:        info@highwind.com, freebsd-current@FreeBSD.ORG
Subject:   Re: free() called recursively
Message-ID:  <199809081829.LAA03403@usr07.primenet.com>
In-Reply-To: <26273.905200961@critter.freebsd.dk> from "Poul-Henning Kamp" at Sep 7, 98 10:42:41 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809081829.LAA03403>