Matthias Krüger
eb8114bad7
Rollup merge of #128277 - RalfJung:offset_from_wildcard, r=oli-obk
...
miri: fix offset_from behavior on wildcard pointers
offset_from wouldn't behave correctly when the "end" pointer was a wildcard pointer (result of an int2ptr cast) just at the end of the allocation. Fix that by expressing the "same allocation" check in terms of two `check_ptr_access_signed` instead of something specific to offset_from, which is both more canonical and works better with wildcard pointers.
The second commit just improves diagnostics: I wanted the "pointer is dangling (has no provenance)" message to say how many bytes of memory it expected to see (since if it were 0 bytes, this would actually be legal, so it's good to tell the user that it's not 0 bytes). And then I was annoying that the error looks so different for when you deref a dangling pointer vs an out-of-bounds pointer so I made them more similar.
Fixes https://github.com/rust-lang/miri/issues/3767
2024-07-29 11:42:34 +02:00
..
2024-07-18 18:39:20 +00:00
2024-07-18 00:19:27 +00:00
2024-07-22 22:51:53 +00:00
2024-07-28 03:11:54 +08:00
2024-07-28 08:57:16 +02:00
2024-07-18 11:58:16 +02:00
2024-07-23 01:48:03 +02:00
2024-07-23 01:48:03 +02:00
2024-07-26 13:56:06 -04:00
2024-07-28 20:07:46 +02:00
2024-07-25 22:50:58 +00:00
2024-07-24 17:19:44 -04:00
2024-07-12 11:52:04 -04:00
2024-07-18 00:00:04 +00:00
2024-07-25 16:48:21 +02:00
2024-07-14 13:50:09 +09:00
2024-07-14 13:50:09 +09:00
2024-07-12 18:52:52 +00:00
2024-07-23 09:45:28 +00:00
2024-07-22 21:51:44 -04:00
2024-07-18 14:32:10 +02:00
2024-07-19 23:27:42 +03:00
2024-07-18 20:08:38 +00:00
2024-07-25 22:50:58 +00:00
2024-07-06 21:00:30 +08:00
2024-07-12 03:02:57 +00:00
2024-07-26 02:20:28 -04:00
2024-07-27 21:12:54 +02:00
2024-07-27 21:12:54 +02:00
2024-07-21 22:32:29 -04:00
2024-07-12 03:02:57 +00:00
2024-07-11 12:23:44 +10:00
2024-07-16 18:03:15 +03:00
2024-07-06 14:24:20 +02:00
2024-07-11 08:14:28 +02:00
2024-07-12 03:02:57 +00:00
2024-07-18 18:39:20 +00:00
2024-07-02 02:30:38 +01:00
2024-07-18 00:00:04 +00:00
2024-07-18 18:20:35 +00:00
2024-07-18 18:20:35 +00:00
2024-07-27 21:12:54 +02:00
2024-07-22 10:12:00 -04:00
2024-07-07 18:16:38 +02:00
2024-07-18 18:20:35 +00:00
2024-07-17 16:22:26 +02:00
2024-07-28 03:11:54 +08:00
2024-07-12 03:02:57 +00:00
2024-07-17 16:22:26 +02:00
2024-07-22 22:51:53 +00:00
2024-07-17 11:01:29 +01:00
2024-07-22 22:51:53 +00:00
2024-07-12 03:02:57 +00:00
2024-07-25 22:50:58 +00:00
2024-07-11 12:23:44 +10:00
2024-07-25 04:43:18 +02:00
2024-07-13 13:12:52 +00:00
2024-07-24 21:03:27 +00:00
2024-07-17 11:01:29 +01:00
2024-07-18 11:58:16 +02:00
2024-07-11 12:23:44 +10:00
2024-07-11 12:23:44 +10:00
2024-07-25 04:43:19 +02:00
2024-07-12 21:16:09 -04:00
2024-07-24 21:03:27 +00:00
2024-07-12 03:02:57 +00:00
2024-07-25 15:14:42 -04:00
2024-07-22 22:51:53 +00:00
2024-07-24 18:00:35 +02:00
2024-07-19 18:53:40 +02:00
2024-07-12 03:22:32 +00:00
2024-07-18 20:08:38 +00:00
2024-07-22 22:51:53 +00:00
2024-07-11 12:23:44 +10:00
2024-07-26 02:20:29 -04:00
2024-07-04 02:02:21 +00:00
2024-07-21 13:45:55 -04:00
2024-07-27 05:33:24 -04:00
2024-07-18 20:08:38 +00:00
2024-07-05 11:17:49 -04:00
2024-07-22 22:51:53 +00:00
2024-07-21 21:42:10 +08:00
2024-07-17 16:22:26 +02:00
2024-07-11 17:01:36 +02:00
2024-07-04 02:02:21 +00:00
2024-07-11 12:23:44 +10:00
2024-07-21 22:32:29 -04:00
2024-07-18 18:20:35 +00:00
2024-07-26 00:57:20 +02:00
2024-07-12 03:02:57 +00:00
2024-07-24 08:46:52 +02:00
2024-07-11 12:23:44 +10:00
2024-07-11 12:23:44 +10:00
2024-07-11 12:23:44 +10:00
2024-07-26 19:03:08 -04:00
2024-07-24 08:46:52 +02:00
2024-07-24 22:59:57 -04:00
2024-07-26 02:20:28 -04:00
2024-07-24 21:03:52 +10:00
2024-07-11 12:23:44 +10:00
2024-07-18 18:10:15 +02:00
2024-07-12 03:02:57 +00:00
2024-07-24 08:02:55 +02:00
2024-07-12 21:16:09 -04:00
2024-07-11 20:39:24 +00:00
2024-07-11 12:23:44 +10:00
2024-07-26 02:20:30 -04:00
2024-06-30 23:11:54 -04:00
2024-07-28 08:57:16 +02:00
2024-07-28 13:42:18 +02:00
2024-07-18 20:08:38 +00:00
2024-07-17 21:45:43 +00:00
2024-07-18 13:33:38 +00:00
2024-07-24 21:03:27 +00:00
2024-07-02 16:31:40 +02:00
2024-07-18 20:08:38 +00:00
2024-07-16 19:27:28 -07:00
2024-06-30 17:08:45 +00:00
2024-07-23 13:06:54 +02:00
2024-07-21 05:36:21 +00:00
2024-07-16 19:27:28 -07:00
2024-07-18 20:08:38 +00:00
2024-07-22 22:51:53 +00:00
2024-07-25 22:33:45 +08:00
2024-07-17 11:01:29 +01:00
2024-07-17 07:55:22 +08:00
2024-07-15 22:21:41 +00:00
2024-07-11 00:18:47 +08:00
2024-07-10 18:56:06 -04:00
2024-07-11 12:23:44 +10:00
2024-07-14 17:46:25 +05:30
2024-07-26 20:14:16 +00:00
2024-07-22 22:51:53 +00:00
2024-07-11 12:23:44 +10:00
2024-07-11 12:23:44 +10:00
2024-07-23 01:48:03 +02:00
2024-07-04 05:19:35 +00:00
2024-07-22 07:29:59 +02:00
2024-07-14 13:50:09 +09:00
2024-07-23 01:48:03 +02:00
2024-07-23 01:26:25 +02:00
2024-07-22 22:51:53 +00:00
2024-07-24 16:00:48 +00:00
2024-07-25 04:43:19 +02:00
2024-07-11 20:39:24 +00:00
2024-07-22 22:51:53 +00:00
2024-07-22 22:51:53 +00:00
2024-07-24 21:03:27 +00:00
2024-07-24 08:02:55 +02:00
2024-07-11 12:23:44 +10:00
2024-07-24 21:03:27 +00:00
2024-07-04 06:06:33 +00:00
2024-07-25 20:53:33 +03:00
2024-07-26 13:56:06 -04:00
2024-07-18 00:00:04 +00:00
2024-07-18 16:51:06 -04:00
2024-07-02 11:37:59 -04:00
2024-07-04 02:02:21 +00:00
2024-07-04 02:02:21 +00:00
2024-07-04 05:36:34 +00:00
2024-07-04 02:02:21 +00:00
2024-07-22 22:51:53 +00:00
2024-07-11 12:23:44 +10:00
2024-07-25 20:53:33 +03:00
2024-07-06 21:00:30 +08:00
2024-07-06 21:00:30 +08:00
2024-07-02 11:37:59 -04:00
2024-07-14 13:50:09 +09:00
2024-07-22 22:51:53 +00:00
2024-07-12 21:16:09 -04:00
2024-07-02 15:48:48 -04:00
2024-07-11 12:23:44 +10:00
2024-07-05 00:52:01 +00:00