This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261>
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816059>
<https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1570055>

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.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]