Philip Withnall
b53b26c559
gvariant: Track checked and ordered offsets independently
...
The past few commits introduced the concept of known-good offsets in the
offset table (which is used for variable-width arrays and tuples).
Good offsets are ones which are non-overlapping with all the previous
offsets in the table.
If a bad offset is encountered when indexing into the array or tuple,
the cached known-good offset index will not be increased. In this way,
all child variants at and beyond the first bad offset can be returned as
default values rather than dereferencing potentially invalid data.
In this case, there was no information about the fact that the indexes
between the highest known-good index and the requested one had been
checked already. That could lead to a pathological case where an offset
table with an invalid first offset is repeatedly checked in full when
trying to access higher-indexed children.
Avoid that by storing the index of the highest checked offset in the
table, as well as the index of the highest good/ordered offset.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org >
Helps: #2121
2023-03-24 08:55:17 -05:00
..
2020-07-27 15:41:09 +01:00
2019-01-16 10:24:11 -05:00
2019-01-15 15:11:43 +00:00
2021-01-06 01:06:28 +01:00
2020-02-27 10:33:45 +00:00
2019-01-15 15:11:43 +00:00
2023-03-24 08:55:17 -05:00
2020-11-20 14:48:14 +00:00
2019-08-24 19:14:05 +00:00
2017-05-24 11:58:19 +02:00
2020-06-12 15:01:08 +01:00
2021-02-11 10:14:15 +00:00
2019-10-07 14:38:24 +02:00
2020-12-12 18:30:22 +00:00
2019-07-29 12:27:29 +01:00
2017-05-24 11:58:19 +02:00
2020-11-20 14:41:07 +00:00
2021-03-01 09:18:03 +00:00
2021-01-05 21:42:59 +01:00
2020-05-28 09:21:35 +01:00
2020-01-15 13:15:54 +00:00
2017-05-24 11:58:19 +02:00
2021-03-04 04:39:27 +06:00
2017-05-24 11:58:19 +02:00
2020-12-12 18:30:22 +00:00
2020-05-28 14:55:53 +01:00
2018-06-02 09:45:55 +02:00
2021-02-11 10:14:15 +00:00
2017-05-24 11:58:19 +02:00
2020-06-23 10:49:44 +01:00
2019-05-27 17:51:40 +00:00
2017-05-24 11:58:19 +02:00
2020-12-12 18:30:22 +00:00
2017-05-24 11:58:19 +02:00
2020-09-18 23:50:09 +05:30
2020-07-23 13:57:59 +05:30
2018-08-22 11:18:02 +01:00
2019-01-28 15:24:06 +01:00
2017-05-24 11:58:19 +02:00
2017-05-24 11:58:19 +02:00
2020-12-21 16:50:53 +00:00
2020-06-23 10:49:44 +01:00
2021-01-04 15:38:27 +00:00
2019-07-29 12:27:29 +01:00
2021-02-04 16:04:10 +00:00
2017-05-24 11:58:19 +02:00
2020-06-12 15:01:08 +01:00
2020-06-12 15:01:08 +01:00
2017-05-24 11:58:19 +02:00
2021-01-13 13:29:02 +00:00
2021-01-13 13:29:48 +00:00
2020-12-31 14:58:37 +01:00
2020-07-26 21:37:46 +01:00
2020-06-12 15:01:08 +01:00
2017-05-24 11:58:19 +02:00
2021-02-04 16:04:10 +00:00
2019-05-30 10:38:45 +01:00
2019-08-24 19:14:05 +00:00
2017-05-24 11:58:19 +02:00
2017-11-12 16:36:16 +01:00
2017-05-24 11:58:19 +02:00
2021-03-18 19:42:18 +00:00
2017-05-24 11:58:19 +02:00
2017-05-24 11:58:19 +02:00
2017-05-24 11:58:19 +02:00
2021-02-08 10:37:01 +00:00
2019-08-24 19:14:05 +00:00
2020-08-21 05:50:02 +02:00
2020-07-23 13:57:59 +05:30
2021-03-23 16:56:33 +00:00
2018-08-22 11:18:02 +01:00
2020-11-17 15:50:07 +00:00
2018-08-25 23:59:45 +01:00
2019-09-05 14:16:58 +01:00
2020-10-14 11:01:24 +00:00
2021-01-06 15:44:59 +00:00
2021-01-06 15:44:59 +00:00
2019-12-11 11:48:41 +00:00
2020-06-10 09:48:02 +01:00
2021-02-01 10:44:35 +00:00
2020-10-02 15:45:44 +01:00
2019-11-26 12:17:04 +00:00
2020-10-14 11:01:24 +00:00
2018-01-04 22:19:30 +01:00
2019-08-24 19:14:05 +00:00
2020-05-19 16:20:31 +01:00
2013-01-13 13:11:57 -05:00
2020-09-22 16:41:55 +01:00
2019-11-25 13:09:25 +01:00
2021-04-27 13:11:03 +02:00
2017-05-24 11:58:19 +02:00
2021-01-04 15:42:03 +00:00
2020-05-15 11:59:06 +01:00
2019-03-15 21:30:22 +01:00
2018-08-22 11:18:02 +01:00
2020-11-20 14:40:19 +00:00
2017-05-24 11:58:19 +02:00
2020-05-19 15:12:16 +01:00
2021-02-25 15:33:59 +00:00
2021-01-05 21:42:59 +01:00
2020-11-25 11:34:05 +00:00
2008-04-08 02:59:05 +00:00
2020-06-12 15:01:08 +01:00
2019-06-25 09:19:49 +02:00
2020-11-25 11:34:05 +00:00
2019-06-03 10:57:18 +01:00
2020-07-27 13:21:20 +01:00
2019-11-21 13:07:08 +01:00
2017-05-24 11:58:19 +02:00
2020-05-20 15:32:47 +02:00
2017-05-24 11:58:19 +02:00
2019-03-15 21:30:22 +01:00
2017-05-24 11:58:19 +02:00
2020-11-12 03:25:58 +00:00
2017-05-24 11:58:19 +02:00
2020-06-10 09:48:02 +01:00
2017-05-24 11:58:19 +02:00
2017-05-24 11:58:19 +02:00
2019-09-21 10:48:23 +02:00
2017-05-24 11:58:19 +02:00
2020-09-02 14:38:15 +02:00
2019-05-01 13:01:14 -07:00
2020-06-12 15:01:08 +01:00
2020-06-12 15:01:08 +01:00
2019-07-10 10:10:58 -04:00
2021-02-25 15:33:59 +00:00
2018-12-18 11:18:43 +00:00
2018-11-08 16:04:51 +01:00
2018-11-08 16:04:51 +01:00
2018-07-30 23:06:23 +05:30
2018-12-17 13:53:34 +00:00
2020-11-20 14:40:19 +00:00
2017-10-06 12:49:12 +01:00
2020-11-03 16:59:36 +00:00
2019-05-30 10:38:45 +01:00
2020-03-18 14:50:36 +00:00
2020-11-17 17:25:13 +01:00
2017-05-24 11:58:19 +02:00
2020-03-04 11:21:17 +01:00
2017-05-24 11:58:19 +02:00
2021-02-04 16:04:10 +00:00
2020-07-28 18:22:21 +02:00
2020-09-22 16:41:55 +01:00
2019-11-25 13:09:25 +01:00
2018-06-12 16:13:51 +01:00
2020-06-12 15:01:08 +01:00
2021-02-16 13:44:00 +00:00
2022-01-27 10:24:38 -06:00
2021-02-16 13:44:00 +00:00
2018-10-10 19:19:18 +00:00
2020-07-26 21:38:17 +01:00
2019-09-18 10:47:23 +02:00
2020-01-30 01:56:56 +00:00
2021-02-04 17:34:03 +00:00
2021-02-04 17:34:03 +00:00
2021-08-02 13:49:19 +01:00
2021-02-09 10:50:16 +00:00
2017-10-26 12:27:17 +01:00
2017-05-24 11:58:19 +02:00
2020-10-14 11:01:24 +00:00
2020-10-14 11:01:24 +00:00
2020-06-12 15:01:08 +01:00
2019-05-14 12:14:54 +01:00
2021-04-07 16:36:06 +01:00
2021-01-25 16:34:12 +01:00
2021-02-27 20:34:30 +01:00
2021-01-15 01:45:59 +09:00
2020-11-20 14:41:07 +00:00
2020-05-19 16:17:39 +01:00
2020-07-27 17:28:43 +01:00
2017-05-24 11:58:19 +02:00
2020-01-21 11:56:34 +00:00
2019-07-29 12:27:29 +01:00
2019-07-29 12:27:29 +01:00
2020-11-21 23:11:23 +00:00
2020-11-21 23:11:23 +00:00
2020-11-14 19:04:45 +00:00
2020-11-14 19:04:45 +00:00
2014-02-20 18:27:24 -05:00
2020-05-12 12:41:22 +01:00
2020-07-27 15:41:09 +01:00
2019-05-30 10:39:11 +01:00
2020-10-06 11:07:11 +01:00
2020-10-06 11:07:11 +01:00
2020-11-20 14:40:19 +00:00
2017-05-24 11:58:19 +02:00
2020-03-18 14:50:36 +00:00
2020-03-18 14:50:36 +00:00
2020-03-18 14:50:36 +00:00
2017-05-24 11:58:19 +02:00
2019-10-08 13:50:13 +01:00
2020-03-18 14:50:36 +00:00
2020-03-31 14:18:32 +01:00
2020-03-18 14:50:36 +00:00
2021-02-10 18:25:53 +02:00
2021-02-03 09:47:30 +00:00
2021-03-11 13:37:49 +00:00
2020-06-25 13:57:35 +04:00
2020-09-10 14:14:32 +01:00
2022-01-27 10:14:14 -06:00
2020-11-25 11:34:05 +00:00
2018-12-17 17:16:03 +00:00
2020-06-10 09:48:02 +01:00
2017-02-06 14:40:38 +01:00
2018-05-28 09:22:55 -04:00
2023-03-24 08:55:17 -05:00
2020-08-18 09:46:12 +01:00
2018-10-23 17:01:51 +13:00
2019-10-30 15:37:39 +00:00
2023-03-24 08:55:17 -05:00
2023-03-24 08:55:17 -05:00
2023-03-24 08:55:17 -05:00
2019-10-18 13:53:18 +01:00
2021-02-04 16:04:10 +00:00
2018-10-23 17:01:51 +13:00
2019-08-24 19:14:05 +00:00
2020-06-12 15:01:08 +01:00
2017-05-24 11:58:19 +02:00
2017-05-24 11:58:19 +02:00
2022-01-27 10:13:58 -06:00
2018-04-27 16:46:19 +01:00
2017-05-24 11:58:19 +02:00
2019-08-10 21:56:33 +02:00
2021-01-05 21:42:59 +01:00
2017-07-12 22:36:30 +02:00
2016-05-23 10:52:10 -04:00
2021-02-03 14:09:10 +05:30
2020-11-17 15:50:07 +00:00
2020-04-27 22:00:50 +03:00
2016-08-13 10:31:26 +02:00