public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "d dot yu dot bolkhovityanov at inp dot nsk dot su" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/18006] New: Please replace vfork() with fork()
Date: Fri, 15 Oct 2004 05:57:00 -0000	[thread overview]
Message-ID: <20041015055659.18006.d.yu.bolkhovityanov@inp.nsk.su> (raw)

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


             reply	other threads:[~2004-10-15  5:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15  5:57 d dot yu dot bolkhovityanov at inp dot nsk dot su [this message]
2004-10-15  9:32 ` [Bug driver/18006] " schwab at suse dot de
2004-10-15  9:46 ` schwab at suse dot de
2004-10-15  9:46 ` d dot yu dot bolkhovityanov at inp dot nsk dot su
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041015055659.18006.d.yu.bolkhovityanov@inp.nsk.su \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).