Files
rust/tests/crashes
Jacob Pratt fec8cd51b7 Rollup merge of #158587 - sjwang05:issue-155168, r=JohnTitor
check if len of array const arg matches the expected len of the type when lowering to valtree

When creating valtrees for arrays passed as const args in `lower_const_arg_array`, we assume the array has the correct length without actually checking the length of the arg, leading to UB at runtime (rust-lang/rust#155168) or an ICE during CTFE (rust-lang/rust#151079). This PR adds a check comparing the expected length of the type with the actual number of elements, similar to `lower_const_arg_tup`.

fixes rust-lang/rust#155168
2026-08-08 23:51:56 -04:00
..
2025-12-25 12:27:17 +00:00
…
…
…
…
…
…
…
…
…
…
2026-08-04 18:44:28 +00:00
…
…
…
…
…
…
…
2026-07-13 10:54:53 +02:00
…
…
2025-06-11 15:30:15 +01:00
2026-07-13 10:54:53 +02:00
…
…
2025-12-25 12:27:17 +00:00
…
…
…
…
…
…
…
…
…
2026-07-13 10:54:53 +02:00
…
…
…
…
2025-12-25 12:27:17 +00:00
2025-09-26 15:37:19 -07:00
…
…
2026-07-13 10:54:53 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-09-29 11:04:50 +10:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-07-13 10:54:53 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-07-20 18:24:17 +02:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-12-25 12:27:17 +00:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-05-01 17:04:37 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2025-05-18 17:25:34 +02:00
2026-03-09 18:51:25 -04:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-28 09:39:21 +00:00
2026-07-20 18:24:17 +02:00
2026-06-28 09:39:21 +00:00
2026-07-20 18:24:17 +02:00
2026-06-28 09:39:21 +00:00
2026-03-09 18:51:25 -04:00
2026-06-28 09:39:21 +00:00
2026-06-28 09:39:21 +00:00
2026-06-28 09:39:21 +00:00
2026-06-28 09:39:21 +00:00
2026-07-20 18:24:17 +02:00
2026-07-20 18:24:17 +02:00
2026-06-28 09:39:21 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2026-06-27 08:51:24 +00:00
2025-12-17 21:25:19 +02:00

Documentation on crash tests is at https://rustc-dev-guide.rust-lang.org/tests/compiletest#crash-tests.

Alternatively, you can build the documentation from this repository:

mdbook serve --open src/doc/rustc-dev-guide

The documentation will then be available at http://localhost:3000/tests/compiletest.html#crash-tests.