Dmitry V. Levin
21cc130b78
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.
2019-06-20 17:32:07 +00:00
..
2019-01-03 11:12:39 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2017-02-16 17:33:18 -05:00
2014-11-26 12:54:39 +00:00
2014-11-26 12:54:39 +00:00
2019-01-01 00:11:28 +00:00
2014-11-27 16:01:04 +00:00
2017-02-16 17:33:18 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-05-20 21:54:57 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-06-12 14:48:33 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-03 11:12:39 -05:00
2019-06-20 17:32:07 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-03 09:38:24 +01:00
2019-02-03 09:38:24 +01:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-03 09:38:24 +01:00
2019-02-03 09:38:24 +01:00
2019-05-21 12:03:54 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-05-20 21:54:57 +02:00
2019-05-20 21:54:57 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-05-20 21:54:57 +02:00
2019-05-20 21:54:57 +02:00
2019-01-01 00:11:28 +00:00
2019-05-20 21:54:57 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-03 09:38:24 +01:00
2019-01-01 00:11:28 +00:00
2019-02-18 16:37:00 +01:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-31 14:07:45 -08:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-02 13:53:52 -02:00
2019-01-03 11:12:39 -05:00
2019-01-03 11:12:39 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-05-20 21:54:57 +02:00
2019-06-12 14:48:33 +02:00
2019-06-20 17:32:07 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-18 16:37:00 +01:00
2019-01-01 00:11:28 +00:00
2019-02-18 16:37:00 +01:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-18 16:37:00 +01:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-31 14:07:45 -08:00
2019-01-31 14:07:45 -08:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-31 14:07:45 -08:00
2019-01-31 14:07:45 -08:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-18 16:37:00 +01:00
2019-02-18 16:37:00 +01:00
2019-01-03 11:12:39 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-03 11:12:39 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2015-10-12 15:18:08 +02:00
2018-10-17 09:34:13 +02:00
2019-01-01 00:11:28 +00:00
2019-01-31 14:07:45 -08:00
2019-02-06 12:29:02 +01: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
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2017-02-16 17:33:18 -05:00
2017-02-16 17:33:18 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2016-06-11 14:50:16 -07:00
2018-02-21 14:39:54 -05:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-02 13:53:52 -02:00
2019-01-02 13:53:52 -02:00
2014-11-05 15:24:08 +05:30
2014-11-05 15:24:08 +05:30
2014-11-05 15:24:08 +05:30
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-05-21 12:03:54 +02:00
2019-05-21 12:03:54 +02:00
2019-05-15 16:47:09 +02:00
2019-05-15 16:47:09 +02:00
2019-01-01 00:11:28 +00:00
2017-09-09 12:41:54 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2018-07-06 17:52:54 +02:00
2019-02-03 09:38:24 +01:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-02-03 09:38:24 +01:00
2019-01-01 00:11:28 +00:00
2019-05-20 21:54:57 +02:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-01 00:11:28 +00:00
2019-01-03 11:12:39 -05:00
2019-02-25 13:19:19 +00:00