Dmitry V. Levin
91b02c5b4d
libio: do not attempt to free wide buffers of legacy streams [BZ #24228 ]
...
Commit a601b74d31ca086de38441d316a3dee24c866305 aka glibc-2.23~693
("In preparation for fixing BZ#16734, fix failure in misc/tst-error1-mem
when _G_HAVE_MMAP is turned off.") introduced a regression:
_IO_unbuffer_all now invokes _IO_wsetb to free wide buffers of all
files, including legacy standard files which are small statically
allocated objects that do not have wide buffers and the _mode member,
causing memory corruption.
Another memory corruption in _IO_unbuffer_all happens when -1
is assigned to the _mode member of legacy standard files that
do not have it.
[BZ #24228 ]
* libio/genops.c (_IO_unbuffer_all)
[SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)]: Do not attempt to free wide
buffers and access _IO_FILE_complete members of legacy libio streams.
* libio/tst-bz24228.c: New file.
* libio/tst-bz24228.map: Likewise.
* libio/Makefile [build-shared] (tests): Add tst-bz24228.
[build-shared] (generated): Add tst-bz24228.mtrace and
tst-bz24228.check.
[run-built-tests && build-shared] (tests-special): Add
$(objpfx)tst-bz24228-mem.out.
(LDFLAGS-tst-bz24228, tst-bz24228-ENV): New variables.
($(objpfx)tst-bz24228-mem.out): New rule.
(cherry picked from commit 21cc130b78a4db9113fb6695e2b951e697662440)
2019-06-20 17:32:07 +00:00
..
2018-02-21 14:22:50 -05:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2017-02-16 17:33:18 -05:00
2018-01-01 00:32:25 +00:00
2017-02-16 17:33:18 -05:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:39:54 -05:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-03-13 08:31:56 -04:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:39:54 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:11:05 -05:00
2018-07-06 17:52:54 +02:00
2018-07-06 17:52:54 +02:00
2018-07-06 17:52:54 +02:00
2018-07-06 17:52:54 +02:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2019-06-20 17:32:07 +00:00
2018-02-21 18:01:11 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:39:54 -05:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:39:54 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:13:21 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:39:54 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:11:05 -05:00
2018-04-03 00:36:33 +00:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:13:21 -05:00
2018-04-03 00:36:33 +00:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:13:21 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:39:54 -05:00
2018-06-20 09:45:19 +02:00
2019-06-20 17:32:07 +00:00
2018-06-01 10:41:03 +02:00
2018-02-21 14:11:05 -05:00
2018-03-13 08:31:56 -04:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:22:50 -05:00
2018-02-21 14:39:54 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:13:21 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:13:21 -05:00
2018-02-21 14:39:54 -05:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:39:54 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-07-10 11:03:08 +02:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:11:05 -05:00
2018-07-05 19:00:10 +02:00
2018-06-01 10:41:03 +02:00
2018-06-01 10:41:03 +02:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2019-06-20 17:32:07 +00:00
2019-06-20 17:32:07 +00:00
2018-03-13 08:31:56 -04:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2017-02-16 17:33:18 -05:00
2017-02-16 17:33:18 -05:00
2018-01-29 23:00:17 +01:00
2018-02-21 14:39:54 -05:00
2018-01-01 00:32:25 +00:00
2018-11-19 14:21:24 +01:00
2018-06-26 12:31:08 +02:00
2018-06-26 12:31:08 +02:00
2018-06-26 12:31:08 +02:00
2019-05-15 17:08:48 +02:00
2019-05-15 17:08:48 +02:00
2018-01-01 00:32:25 +00:00
2017-09-09 12:41:54 +02:00
2018-01-29 23:00:17 +01:00
2018-06-01 10:41:03 +02:00
2018-07-06 17:52:54 +02:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2018-06-26 10:24:52 +02:00
2018-01-01 00:32:25 +00:00
2018-02-21 14:11:05 -05:00
2018-02-21 14:11:05 -05:00
2019-05-15 17:08:48 +02:00
2018-02-21 14:39:54 -05:00
2018-06-01 10:41:03 +02:00
2018-01-01 00:32:25 +00:00
2018-01-01 00:32:25 +00:00
2018-06-01 10:41:03 +02:00