The open() system call in f8 really broken...

Jakub Jelinek jakub at redhat.com
Mon Aug 20 08:40:49 UTC 2007


On Mon, Aug 20, 2007 at 09:35:00AM +0100, David Woodhouse wrote:
> On Thu, 2007-08-16 at 18:19 -0400, Alan Cox wrote:
> > On Thu, Aug 16, 2007 at 05:26:32PM -0400, Jakub Jelinek wrote:
> > > In this case you are not calling open(1), but some function pointer.
> > > And therefore it is undesirable to let it be expanded as function-like
> > > macro (which POSIX allows).
> > > The right fix is to use one of:
> > 
> > Gak... 
> > 
> > Can we go back to C as used in the real world please
> 
> Out of interest, why isn't it sufficient to just make _compilation_ fail
> for offending programs. Why do we have to do it at runtime?

Cases like
int foo (int flags)
{
  return open ("/tmp/foobar", flags);
}

...
  foo (O_CREAT | O_RDWR);
are not detectable at compile time.  The non-constant flags for open
is orders of magnitude less common and after the mass rebuild we can
investigate all the places in the distro which call __open_2 etc.

	Jakub




More information about the Fedora-maintainers mailing list