Re: 1352 NUL bytes at the end of a page?

viro
2004-05-17T15:37:39Z

On Mon, May 17, 2004 at 08:22:10AM -0700, Linus Torvalds wrote:
>
>
> On Mon, 17 May 2004, Theodore Ts'o wrote:
> >
> > Note though that the stdio library uses a writeable mmap to implement
> > fwrite.
>
> It does? Whee. Then I'll have to agree with Andrew - if there is a path
> that is more likely to have bugs, it's trying to do writes with mmap and
> ftruncate.
>
> Who came up with that braindead idea? Is it some crazed Mach developer
> that infiltrated the glibc development group?

IIRC, that idiocy had been disabled by default (note that it's inherently
broken, since truncate() between your mmap() and memcpy() will lead to
a coredump, which is not something fwrite() is allowed to do in such
situation).

strace should show if there such mmap calls are made, anyway. Did they
show up in the traces?