This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: BZ #1190: stream behaviour on encountering an EOF
Sorry, I got mixed up in some other stuff and this fell through.
On Thu, 13 Sep 2012 12:48:39 -0700 (PDT), Roland wrote:
> I don't think we want to have multiple modes for compilation.
> The system is complex enough already.
>
> Looking at the code, I note that _IO_wfile_underflow doesn't even have
> the #if 0'd check. The change needs to be made consistently between
> regular and wide stream functions, and tests added for this issue
> should cover the wide-char code paths.
That shouldn't be too hard in itself since we could put this check in
the __uflow functions (both in genops and wgenops). The hard part is
the compatibility.
> This is not a bug per se but an intentional change in behavior.
> Hence, the conservative thing to do is to arrange that existing
> binaries don't have their behavior changed. Newly-compiled programs
> getting new behavior unconditionally is much more acceptable.
>
> The normal way to achieve that is by introducing new symbol versions
> for affected symbols. Old ones get old behavior and new ones get new
> behavior. For this issue, that could be a lot of work. It affects
> everything using stdio for input, so the naive approach would touch a
> huge number of symbols. Perhaps we can figure out a way to do it that
> does not involve so much churn. It needs some careful thought. It's
> straightforward to use an internal flag bit to control the behavior.
> But then we need to figure out what all compat symbols we'd need to
> have that arrange to set the flag.
I'll look at how this can be done. Seems hard to do without new symbol
versions.
Thanks,
Siddhesh