public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/18006] New: Please replace vfork() with fork()
@ 2004-10-15  5:57 d dot yu dot bolkhovityanov at inp dot nsk dot su
  2004-10-15  9:32 ` [Bug driver/18006] " schwab at suse dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: d dot yu dot bolkhovityanov at inp dot nsk dot su @ 2004-10-15  5:57 UTC (permalink / raw)
  To: gcc-bugs

When built gcc-4.0 (20041010 snapshot), I discovered that GCC again uses vfork()
instead of regular fork().  This is a "bad thing" due to following reasons:

- vfork() is deprecated -- it was a BSD kludge from old no-MMU-days (a
politically-correct reason :-).

- At least in Linux, vfork()s can't be followed by strace/ltrace, which makes
debugging obscure situations MUCH harder.

Of course, one can say "so -- build your own copy with vfork() disabled" (BTW --
how? There is no "--enable-vfork/--disable-vfork".).

But even having an OPPORTUNITY for vfork() to be used is a danger -- someone
else can supply you a vfork'ed GCC, which is undebuggable.  For example, I've
spent many hours trying to find out why some cross-compiler for PPC fails (it
simply ignored the "-B" switch), while being able to strace it could give the
clue in a minute.

Interestingly, gcc-3.4.2, built in exactly the same way (../gcc-3.4.2/configure
--prefix=/tmp/gcc-3.4 --enable-languages=c,c++) does "the right thing" -- it
uses fork().

-- 
           Summary: Please replace vfork() with fork()
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: d dot yu dot bolkhovityanov at inp dot nsk dot su
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18006


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-10-15 13:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15  5:57 [Bug driver/18006] New: Please replace vfork() with fork() d dot yu dot bolkhovityanov at inp dot nsk dot su
2004-10-15  9:32 ` [Bug driver/18006] " schwab at suse dot de
2004-10-15  9:46 ` d dot yu dot bolkhovityanov at inp dot nsk dot su
2004-10-15  9:46 ` schwab at suse dot de
2004-10-15 11:55 ` pinskia at gcc dot gnu dot org
2004-10-15 13:02 ` d dot yu dot bolkhovityanov at inp dot nsk dot su

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).