is dl_iterate_phdr() supposed to be async-signal safe?

David Mosberger davidm@napali.hpl.hp.com
Fri Apr 2 00:09:00 GMT 2004


>>>>> On Thu, 1 Apr 2004 13:22:03 -0800, Roland McGrath <roland@redhat.com> said:

  Roland> Why would you have thought that it was?  It is
  Roland> well-specified that no interface is async-signal-safe unless
  Roland> explicitly listed as such.  No such claim was ever made
  Roland> about dl_iterate_phdr.

Because otherwise there is no way to unwind from a signal handler and
I was mislead by the fact that it was using a recursive lock (and it
was only indirectly calling pthread_mutex_lock(), which is defined not
to be async-signal safe).

Can this please be fixed?  Wouldn't it be sufficient to disable signal
delivery during lock acquisition/release and while modifying the ELF
object list?

	--david



More information about the Libc-hacker mailing list