C compiler bugs on 386 and 3B2

Guy Harris guy at auspex.auspex.com
Tue Sep 25 05:23:47 AEST 1990


>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.

All "ld" has to do to produce that behavior is to unlink any existing
target file and create a new one; most versions of UNIX allow the
super-user to unlink directories (yes, I know, SunOS doesn't; however,
it doesn't disallow making hard links to directories - if it's going to
disallow removing hard links to them, it should bloody well disallow
making them in the first place).  It most definitely doesn't have to do
"direct writes to ...  directories".

>This is one of the few things which is (usually) denied even to root.

Writing to directories is.  Unlinking them isn't.

>But somehow, ld bypasses the safeguards.

There is no safeguard to bypass.

>Is ld writing on the raw device?

Probably not; there's no reason for it to do so (unless you ask it do,
somehow).



More information about the Comp.sys.att mailing list