Shamil Abdulaev
ad66f46380
libio: Use __wunderflow in _IO_getwline_info
...
After a buffer refill, _IO_getwline_info reads the first character
through __wuflow and handles it on a separate path from the rest of
the buffer. When extract_delim is negative, that path calls
_IO_sputbackc, the narrow-stream putback, on a wide stream, so it
would operate on fp->_IO_read_ptr instead of
fp->_wide_data->_IO_read_ptr. No current caller passes a negative
extract_delim, so this is not reachable today.
Refill the buffer with __wunderflow instead, which does not consume
anything, and let the wmemchr path handle every character including
the delimiter. This removes the duplicated delimiter handling and
the wrong putback. Every wide underflow implementation either
returns WEOF or leaves at least one character in the buffer, so the
loop cannot spin.
No functional change for fgetws and fgetws_unlocked. Tested with the
libio tests on x86_64-linux-gnu, including tst-fgetws and tst-widetext.
Signed-off-by: Shamil Abdulaev <ashamil435@gmail.com >
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org >
2026-10-07 07:43:12 -03:00
..
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-18 13:31:00 -03:00
2002-08-27 06:41:29 +00:00
2023-06-13 19:59:08 -04:00
2003-11-01 21:11:05 +00:00
2017-02-16 17:33:18 -05:00
2023-06-19 09:15:05 -04:00
2014-11-26 12:54:39 +00:00
2014-11-26 12:54:39 +00:00
2003-09-06 09:56:14 +00:00
2023-06-01 12:40:05 -04:00
2026-01-01 13:42:29 -08:00
2023-06-01 12:40:05 -04:00
2014-11-27 16:01:04 +00:00
2002-04-24 21:09:14 +00:00
2023-06-01 12:40:05 -04:00
2026-05-07 10:41:36 -04:00
2017-02-16 17:33:18 -05:00
2024-05-13 12:50:48 +01:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2000-07-29 07:57:34 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-09-16 08:41:01 -03:00
2026-05-18 13:31:00 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-09-16 08:41:01 -03:00
2026-09-16 08:41:01 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-09-16 08:41:01 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-04-07 13:20:55 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-09-16 08:41:01 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-09-16 08:41:01 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-10-07 07:43:12 -03:00
2019-02-18 16:37:00 +01:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-12 11:09:34 +02:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2023-03-27 13:57:55 -03:00
2026-09-16 08:41:01 -03:00
2026-09-16 08:41:01 -03:00
2026-09-16 08:41:01 -03:00
2026-05-20 17:22:19 -03:00
2026-01-01 13:42:29 -08:00
2026-05-13 07:52:40 +02:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-09-16 08:41:01 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-12 11:09:34 +02:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2000-06-23 06:22:36 +00:00
2026-01-01 13:42:29 -08:00
2022-12-19 18:56:55 +01:00
2022-09-22 08:48:04 -03:00
2021-09-03 22:06:44 +05:30
2000-06-17 19:22:43 +00:00
2001-02-09 17:57:28 +00:00
2026-01-01 13:42:29 -08:00
2018-10-17 09:34:13 +02:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2019-06-20 17:32:07 +00:00
2026-01-01 13:42:29 -08:00
2022-03-08 14:25:32 -03:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2021-04-16 11:26:39 -07:00
2026-01-01 13:42:29 -08:00
2021-04-16 11:26:39 -07:00
2026-01-01 13:42:29 -08:00
2002-07-23 00:31:41 +00:00
2007-10-13 07:33:09 +00:00
2022-09-22 08:48:04 -03:00
2026-01-01 13:42:29 -08:00
2024-09-20 10:32:35 -04:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2018-03-13 08:31:56 -04:00
2009-06-15 17:27:48 -07:00
2009-02-04 21:27:48 +00:00
2002-09-30 07:47:16 +00:00
2026-05-13 07:52:40 +02:00
2026-09-04 14:52:22 +02:00
2026-01-01 13:42:29 -08:00
2006-01-19 01:35:28 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2017-02-16 17:33:18 -05:00
2017-02-16 17:33:18 -05:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-20 17:22:15 -03:00
2026-05-20 17:22:19 -03:00
2026-01-01 13:42:29 -08:00
2016-06-11 14:50:16 -07:00
2018-02-21 14:39:54 -05:00
2002-08-30 10:36:44 +00:00
2002-08-30 10:36:44 +00:00
2026-01-01 13:42:29 -08:00
2021-05-16 15:21:18 -06:00
2026-01-01 13:42:29 -08:00
2023-06-02 01:39:48 +00:00
2019-01-02 13:53:52 -02:00
2026-01-01 13:42:29 -08:00
2014-11-05 15:24:08 +05:30
2026-08-28 09:43:42 -03:00
2026-01-01 13:42:29 -08:00
2002-02-26 18:08:08 +00:00
2014-11-05 15:24:08 +05:30
2014-11-05 15:24:08 +05:30
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-04-07 13:20:55 -03:00
2026-01-01 13:42:29 -08:00
2026-03-10 13:24:17 -03:00
2026-09-16 08:41:01 -03:00
2026-01-01 13:42:29 -08:00
2017-09-09 12:41:54 +02:00
2021-05-16 15:21:18 -06:00
2006-09-30 15:09:35 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-20 17:22:15 -03:00
2026-05-20 17:22:19 -03:00
2026-01-01 13:42:29 -08:00
2021-06-02 07:32:19 +02:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-20 17:22:19 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-06-08 17:01:15 +02:00
2026-05-20 17:22:19 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00