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 v3] libio: do not unbuffer legacy standard files in compatibility mode [BZ #24228]


* Dmitry V. Levin:

> _mode is not the only member that is not available in legacy libio,
> _freeres_list and _freeres_buf also should be avoided.
> Would you prefer the following approach?
>
> diff --git a/libio/genops.c b/libio/genops.c
> index 2a0d9b81df..11a15549e8 100644
> --- a/libio/genops.c
> +++ b/libio/genops.c
> @@ -789,9 +789,16 @@ _IO_unbuffer_all (void)
>  
>    for (fp = (FILE *) _IO_list_all; fp; fp = fp->_chain)
>      {
> +      int legacy = 0;
> +
> +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
> +      if (__glibc_unlikely (_IO_vtable_offset (fp) != 0))
> +	legacy = 1;
> +#endif

This approach looks reasonable to me.  It's certainly much better than
what we have today.  If you post a full patch, I'll test it against
one of the problematic OpenJDK 8 builds.


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