Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!mailrus!sharkey!cfctech!kevin From: kevin@cfctech.cfc.com (Kevin Darcy) Newsgroups: comp.sys.att Subject: Re: C compiler bugs on 386 and 3B2 Message-ID: <1990Sep21.224449.20599@cfctech.cfc.com> Date: 21 Sep 90 22:44:49 GMT References: <522@mtndew.Tustin.CA.US> Reply-To: kevin@cfctech.cfc.com (Kevin Darcy) Organization: Chrysler Financial Corporation, Southfield, MI. Lines: 43 In article <522@mtndew.Tustin.CA.US> friedl@mtndew.Tustin.CA.US (Steve Friedl) writes: >Hi folks, > > Two problems with the C compiler on the 386 (AT&T SVR3.2.1) >and the 3B2 (SVR3.2). First, try this as root from some subdirectory: > > # cc foo.c -o ../bin > >where you *really* mean > > # cc foo.c -o ../bin/foo > >It trashes the mentioned directory and requires an fsck to >reattach the files previously found underneath. Strictly >speaking it's not a bug because it *did* do what I asked, but it >is still unfriendly behavior. I just tested this myself (3B2/1000 Model 80, 3.2.2), and... ZOWIE!! It's way beyond unfriendly! It breaks one of the "sacred" rules of Unix - no direct writes to (block-device, mounted) filesystem directories. This is one of the few things which is (usually) denied even to root. For instance, (/bin/sh) # cd /tmp # mkdir if_you_dare # >if_you_dare yields if_you_dare: cannot create even to root. Errno 21 ("Is a directory") exists purely for this purpose. But somehow, ld bypasses the safeguards. Is ld writing on the raw device? Why?? I hope AT&T is listening... ------------------------------------------------------------------------------ kevin@cfctech.cfc.com | Kevin Darcy, Unix Systems Administrator ...sharkey!cfctech!kevin | Technical Services (CFC) Voice: (313) 948-4863 | Chrysler Corporation Fax: (313) 948-4975 | 27777 Franklin, Southfield, MI 48034 ------------------------------------------------------------------------------