NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/56979: fork(2) fails to be signal safe



The following reply was made to PR lib/56979; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/56979: fork(2) fails to be signal safe
Date: Sat, 27 Aug 2022 21:28:23 +0000

 On Fri, Aug 26, 2022 at 01:25:02PM +0000, Tom Lane wrote:
  >  > The rtld exclusive lock blocks signals (except for SIGTRAP, which
  >  > might be a bug...).
  >  
  >  D'oh, I knew that, having looked at the code a few weeks ago...
  >  but yeah, I find the SIGTRAP exception troubling.
  >  
  >  On the whole, the notion that something as simple as a C function call
  >  can result in behind-your-back taking of a lock is pretty scary.
  >  Maybe it's only of concern to code directly associated with the
  >  dynamic loader, but I'm not very convinced.
 
 Dynamic linkers are inherently evil :-|
 
 I suppose we could in principle set up to use different dynamic linker
 images for threaded and unthreaded programs; but in addition to being
 a fairly invasive change, we've found that such measures have a
 tendency to break linux code that assumes everything is always
 threaded.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index