[Bug 291610] libc stdio breaks when file descriptor greater than 32767

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 23 Dec 2025 18:18:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291610

--- Comment #2 from Kristofer Peterson <kris@tranception.com> ---
I have uploaded a patch consisting of two commits against CURRENT for this bug
to phabricator below.

https://reviews.freebsd.org/D54354
https://reviews.freebsd.org/D54355

Rather than simply widening the _file field, the patch keeps the old short
field for compatibility and add a new int field for the file descriptor at the
end of struct __sFILE.

The field have been renamed from _file to _fileno to ensure that any source
code which mucks directly with the internal _file field will break at
compilation rather than build successfully only to break mysteriously later at
runtime.

-- 
You are receiving this mail because:
You are the assignee for the bug.