libio is seriously broken

Ulrich Drepper drepper@redhat.com
Wed Nov 8 13:46:00 GMT 2000


"H . J . Lu" <hjl@valinux.com> writes:

> I got

Test case?

> in _IO_free_backup_area () in genops.c. Please keep in mind that libio
> uses ALLOC_BUF for main buffer allocation, which calls mmap. But
> malloc/free is used for _IO_save_base.

That's right.  But the free() should only be called for backup
buffers.  If it's called for something else the tests for the
availability of a backup buffer are somehow wrong.  And this does not
automatically imply a bug in libio since it's easy enough to
incorrectly modify one of the pointers of flags.

I need a test case.  There are millions of people using the code
without problems (and this is no new code) so you cannot expect me to
go hunting down your problem with a backtrace only.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list