Skip to content

STATUS_ACCESS_VIOLATION when building stage1 std on Windows #150195

@el-ev

Description

@el-ev

Summary

Could not build stage1 std on Windows.

Command used

.\x build  --stage 1 -vv std rustc rustdoc

Expected behaviour

std is compiled successfully.

Actual behaviour

Build failed on core and rustc-demangle. rustc exited with (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION).

Bootstrap configuration (bootstrap.toml)

[rust]
debug = true
debuginfo-level = 1
remap-debuginfo = false

Operating system

Windows 10.0.26100 (Windows 11)

HEAD

d0835ad

Additional context

Build Log

    BuildingDid not run successfully: exit code: 0xc0000005
 "D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\bin\\rustc.exe" "--crate-name" "core" "--edition=2024" "library\\core\\src\\lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=112" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "debuginfo=1" "--warn=unexpected_cfgs" "--check-cfg" "cfg(no_fp_fmt_parse)" "--check-cfg" "cfg(feature, values(any()))" "--check-cfg" "cfg(target_has_reliable_f16)" "--check-cfg" "cfg(target_has_reliable_f16_math)" "--check-cfg" "cfg(target_has_reliable_f128)" "--check-cfg" "cfg(target_has_reliable_f128_math)" "--check-cfg" "cfg(llvm_enzyme)" "-C" "debug-assertions=on" "--check-cfg" "cfg(docsrs,test)" "--check-cfg" "cfg(feature, values(\"debug_refcell\", \"llvm_enzyme\", \"optimize_for_size\", \"panic_immediate_abort\"))" "-C" "metadata=ead27b8ba512714c" "-C" "extra-filename=-78246d07b510ab08" "--out-dir" "D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\x86_64-pc-windows-msvc\\release\\deps" "--target" "x86_64-pc-windows-msvc" "-L" "dependency=D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\x86_64-pc-windows-msvc\\release\\deps" "-L" "dependency=D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\release\\deps" "-Csymbol-mangling-version=legacy" "-Zannotate-moves" "--check-cfg=cfg(feature,values(any()))" "-Zunstable-options" "-Zmacro-backtrace" "-Csplit-debuginfo=packed" "-Ctarget-feature=+crt-static" "-Cprefer-dynamic" "-Zinline-mir" "-Zinline-mir-preserve-debug" "-Zmir_strip_debuginfo=locals-in-tiny-functions" "-Alinker-messages" "-Cembed-bitcode=yes" "-Clto=off" "-Zunstable-options" "-Cforce-frame-pointers=non-leaf" "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" "-Z" "binary-dep-depinfo" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Dwarnings" "--sysroot" "D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1" "-Z" "force-unstable-if-unmarked"[=====================>     ] 15/18: core, rustc-demangle                                 

-------------
error: could not compile `core` (lib)

Caused by:
  process didn't exit successfully: `D:\rust\build\bootstrap\debug\rustc D:\rust\build\bootstrap\debug\rustc --crate-name core --edition=2024 library\core\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=112 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=1 --warn=unexpected_cfgs --check-cfg cfg(no_fp_fmt_parse) --check-cfg "cfg(feature, values(any()))" --check-cfg cfg(target_has_reliable_f16) --check-cfg cfg(target_has_reliable_f16_math) --check-cfg cfg(target_has_reliable_f128) --check-cfg cfg(target_has_reliable_f128_math) --check-cfg cfg(llvm_enzyme) -C debug-assertions=on --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values(\"debug_refcell\", \"llvm_enzyme\", \"optimize_for_size\", \"panic_immediate_abort\"))" -C metadata=ead27b8ba512714c -C extra-filename=-78246d07b510ab08 --out-dir D:\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=D:\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps -L dependency=D:\rust\build\x86_64-pc-windows-msvc\stage1-std\release\deps -Csymbol-mangling-version=legacy -Zannotate-moves --check-cfg=cfg(feature,values(any())) -Zunstable-options -Zmacro-backtrace -Csplit-debuginfo=packed -Ctarget-feature=+crt-static -Cprefer-dynamic -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Alinker-messages -Cembed-bitcode=yes -Clto=off -Zunstable-options -Cforce-frame-pointers=non-leaf "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" -Z binary-dep-depinfo` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
warning: build failed, waiting for other jobs to finish...

Did not run successfully: exit code: 0xc0000005
    Building"D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\bin\\rustc.exe" "--crate-name" "rustc_demangle" "--edition=2015" "\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\rustc-demangle-0.1.26\\src\\lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=112" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=s" "-C" "embed-bitcode=no" "-C" "debug-assertions=on" "--cfg" "feature=\"core\"" "--cfg" "feature=\"rustc-dep-of-std\"" "--check-cfg" "cfg(docsrs,test)" "--check-cfg" "cfg(feature, values(\"compiler_builtins\", \"core\", \"rustc-dep-of-std\", \"std\"))" "-C" "metadata=9e62bd8a76a760d9" "-C" "extra-filename=-72b953f7834f0267" "--out-dir" "D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\x86_64-pc-windows-msvc\\release\\deps" "--target" "x86_64-pc-windows-msvc" "-L" "dependency=D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\x86_64-pc-windows-msvc\\release\\deps" "-L" "dependency=D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\release\\deps" "--extern" "core=D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\x86_64-pc-windows-msvc\\release\\deps\\librustc_std_workspace_core-d79b29c79137b360.rmeta" "--cap-lints" "allow" "-Csymbol-mangling-version=legacy" "-Zannotate-moves" "--check-cfg=cfg(feature,values(any()))" "-Zunstable-options" "-Zmacro-backtrace" "-Csplit-debuginfo=packed" "-Ctarget-feature=+crt-static" "-Cprefer-dynamic" "-Zinline-mir" "-Zinline-mir-preserve-debug" "-Zmir_strip_debuginfo=locals-in-tiny-functions" "-Alinker-messages" "-Cembed-bitcode=yes" "-Clto=off" "-Zunstable-options" "-Cforce-frame-pointers=non-leaf" "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" "-Z" "binary-dep-depinfo" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Dwarnings" "--sysroot" "D:\\rust\\build\\x86_64-pc-windows-msvc\\stage1" "-Z" "force-unstable-if-unmarked"
[=======================>   ] 16/18: rustc-demangle                                              -------------   
error: could not compile `rustc-demangle` (lib)

Caused by:
  process didn't exit successfully: `D:\rust\build\bootstrap\debug\rustc D:\rust\build\bootstrap\debug\rustc --crate-name rustc_demangle --edition=2015 \.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\rustc-demangle-0.1.26\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=112 --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C embed-bitcode=no -C debug-assertions=on --cfg "feature=\"core\"" --cfg "feature=\"rustc-dep-of-std\"" --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values(\"compiler_builtins\", \"core\", \"rustc-dep-of-std\", \"std\"))" -C metadata=9e62bd8a76a760d9 -C extra-filename=-72b953f7834f0267 --out-dir D:\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps --target x86_64-pc-windows-msvc -L dependency=D:\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps -L dependency=D:\rust\build\x86_64-pc-windows-msvc\stage1-std\release\deps --extern core=D:\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps\librustc_std_workspace_core-d79b29c79137b360.rmeta --cap-lints allow -Csymbol-mangling-version=legacy -Zannotate-moves --check-cfg=cfg(feature,values(any())) -Zunstable-options -Zmacro-backtrace -Csplit-debuginfo=packed -Ctarget-feature=+crt-static -Cprefer-dynamic -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Alinker-messages -Cembed-bitcode=yes -Clto=off -Zunstable-options -Cforce-frame-pointers=non-leaf "-Zcrate-attr=doc(html_root_url=\"https://doc.rust-lang.org/nightly/\")" -Z binary-dep-depinfo` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
command did not execute successfully: "D:\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "build" "--target" "x86_64-pc-windows-msvc" "-Zbinary-dep-depinfo" "-j" "20" "-Zroot-dir=D:\\rust" "--verbose" "--release" "-p" "std" "--features" "backtrace panic-unwind" "--manifest-path" "D:\\rust\\library/sysroot/Cargo.toml" "--message-format" "json-render-diagnostics" (failure_mode=Exit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions