Proposal: Deprecate direct access stdio internals (for future hard removal)

Florian Weimer fweimer@redhat.com
Fri Dec 22 16:31:00 GMT 2017


On 12/22/2017 05:24 PM, Zack Weinberg wrote:
> On Fri, Dec 22, 2017 at 5:01 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> I would like to remove quite a few libio internals in a future glibc
>> version.
> 
> I abstractly support this change.  I wonder what the consequences for
> binaries using the "old" stdio (glibc 2.0-format struct _IO_FILE,
> _IO_old_*) will be.  That code isn't being tested at all and may well
> already not work, and if we're prepared to break really old binaries,
> it might make sense to drop that stuff as well.

I looked at this and we should be able to force the inlined C code on 
slow paths if we always keep _IO_read_ptr == _IO_read_end and 
_IO_write_ptr == _IO_write_end.  We would have to add some code to the 
functions on the public interface to recognize the _IO_stdin &c 
variables (some care is needed to take copy relocations into account) 
and substitute them with the official stdin &c variables.  This doesn't 
look too cumbersome.

> I would also like to draw your attention to my patch to stop
> installing libio.h
> [https://sourceware.org/ml/libc-alpha/2017-08/msg01200.html], which
> has not received any review or testing or any reaction at all, in
> fact. :-/

Do we want to put this into 2.27?  I can still try to review it.

(My arc4random patches aren't ready unfortunately, in case you wonder.)

Thanks,
Florian



More information about the Libc-alpha mailing list