rust-lang / rust-lang/rust

`tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs` emits "values of the type `[u8; usize::MAX]` are too big for the target architecture" differently

Open
#140,620 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-debuginfo A-testsuite C-bug T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

For tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs:

  • On x86_64-unknown-linux-gnu, it emits "values of the type [u8; usize::MAX] are too big for the target architecture" with no span information.
  • On x86_64-pc-windows-msvc, it emits "values of the type [u8; usize::MAX] are too big for the target architecture" against the first line of the test.

See https://github.com/rust-lang/rust/pull/140586#issuecomment-2848494132.

Example test failure:

2025-05-03T13:15:27.5986675Z failures:
2025-05-03T13:15:27.5986936Z 
2025-05-03T13:15:27.5987603Z ---- [ui] tests\ui\debuginfo\debuginfo-type-name-layout-ice-94961-2.rs stdout ----
2025-05-03T13:15:27.5988107Z 
2025-05-03T13:15:27.6243506Z error: D:/a/rust/rust/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs:?: unexpected ERROR: '?:?: ?:?: values of the type `[u8; usize::MAX]` are too big for the target architecture'
2025-05-03T13:15:27.6244751Z 
2025-05-03T13:15:27.6245568Z error: D:/a/rust/rust/tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs:1: expected ERROR not found: values of the type `[u8; usize::MAX]` are too big for the target architecture
2025-05-03T13:15:27.6246383Z 
2025-05-03T13:15:27.6246602Z error: 1 unexpected errors found, 1 expected errors not found
2025-05-03T13:15:27.6247012Z status: exit code: 1
2025-05-03T13:15:27.6262898Z command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64;D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\runneradmin\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\7.0\bin;C:\vcpkg;C:\tools\zstd;C:\hostedtoolcache\windows\stack\3.5.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.23.8\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.3.8\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.15-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.9\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\mongosh;C:\Program Files\LLVM\bin;C:\Program Files (x86)\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\ui\\debuginfo\\debuginfo-type-name-layout-ice-94961-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=D:\\a\\rust\\rust\\vendor" "--sysroot" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2" "--target=x86_64-pc-windows-msvc" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\debuginfo\\debuginfo-type-name-layout-ice-94961-2" "-A" "unused" "-A" "internal_features" "-Crpath" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "-C" "debuginfo=2"
2025-05-03T13:15:27.6276473Z 
2025-05-03T13:15:27.6276694Z --- unexpected errors (from JSON output) ---
2025-05-03T13:15:27.6277156Z ERRORline   ?: ?:?: ?:?: values of the type `[u8; usize::MAX]` are too big for the target architecture
2025-05-03T13:15:27.6277554Z ---
2025-05-03T13:15:27.6277767Z --- not found errors (from test file) ---
2025-05-03T13:15:27.6278194Z ERRORline   1: values of the type `[u8; usize::MAX]` are too big for the target architecture
2025-05-03T13:15:27.6278579Z ---
2025-05-03T13:15:27.6278680Z 
2025-05-03T13:15:27.6278686Z 
2025-05-03T13:15:27.6279156Z thread '[ui] tests\ui\debuginfo\debuginfo-type-name-layout-ice-94961-2.rs' panicked at src\tools\compiletest\src\runtest.rs:789:13:
2025-05-03T13:15:27.6279743Z errors differ from expected
2025-05-03T13:15:27.6280111Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2025-05-03T13:15:27.6280393Z 
2025-05-03T13:15:27.6280403Z 
2025-05-03T13:15:27.6280486Z failures:
2025-05-03T13:15:27.6280773Z     [ui] tests\ui\debuginfo\debuginfo-type-name-layout-ice-94961-2.rs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs and the failure reported by compiletest in src/tools/compiletest/src/runtest.rs. Run the UI test on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc, then determine the intended diagnostic span and update the relevant expectation or handling so both targets pass consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.