C compiler bugs on 386 and 3B2
Kevin Darcy
kevin at cfctech.cfc.com
Sat Sep 22 08:44:49 AEST 1990
In article <522 at mtndew.Tustin.CA.US> friedl at 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 at 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
------------------------------------------------------------------------------
More information about the Comp.sys.att
mailing list