This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] libio: Eliminate _IO_stdin, _IO_stdout, _IO_stderr
* Dmitry V. Levin:
> Looks like _IO_legacy_file makes sense only when &_IO_stdin_used == NULL.
> If the check was moved inside _IO_legacy_file, then ...
I'm not sure. We have seen cases where new binaries do not define
_IO_stdin_used, perhaps related to symbol visibility.
So at least for the free call (in _IO_deallocate_file after the patch),
I really want to check that the object isn't any of the preallocated
ones, in case the crashes aren't immediate and we have the potential
here for causing heap corruption.