wasmtime: Cranelift: Doesn't compile anymore on latest Windows Nightly

error: failed to run custom build command for `cranelift-codegen v0.109.0`

Caused by:
  process didn't exit successfully: `D:\a\livesplit-core\livesplit-core\target\debug\build\cranelift-codegen-16ee0d76fd74ed56\build-script-build` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
  --- stdout
  cargo:rustc-cfg=feature="x86"
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=src\prelude.isle
  cargo:rerun-if-changed=src\prelude_opt.isle
  cargo:rerun-if-changed=src\opts\arithmetic.isle
  cargo:rerun-if-changed=src\opts\bitops.isle
  cargo:rerun-if-changed=src\opts\cprop.isle
  cargo:rerun-if-changed=src\opts\extends.isle
  cargo:rerun-if-changed=src\opts\icmp.isle
  cargo:rerun-if-changed=src\opts\remat.isle
  cargo:rerun-if-changed=src\opts\selects.isle
  cargo:rerun-if-changed=src\opts\shifts.isle
  cargo:rerun-if-changed=src\opts\spaceship.isle
  cargo:rerun-if-changed=src\opts\spectre.isle
  cargo:rerun-if-changed=src\opts\vector.isle

  --- stderr
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\settings.rs
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\types.rs
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\opcodes.rs
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\inst_builder.rs
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\settings-x86.rs
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\clif_opt.isle
  Writing generated file: D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\clif_lower.isle
  Rebuilding D:\a\livesplit-core\livesplit-core\target\x86_64-pc-windows-msvc\debug\build\cranelift-codegen-e0c1105143d63b20\out\isle_opt.rs

  thread 'main' has overflowed its stack

Versions and Environment

Cranelift version or commit: cranelift-codegen v0.104.3 as well as cranelift-codegen v0.109.0

Operating system: Windows

Architecture: x86_64

Rust: x86_64-pc-windows-msvc latest update on 2024-07-08, rust version 1.81.0-nightly (20ae37c18 2024-07-07)

Actually seems to have been happening since at least: latest update on 2024-06-30, rust version 1.81.0-nightly (ba1d7f4a0 2024-06-29) Last time I saw it working was: latest update on 2024-06-24, rust version 1.81.0-nightly (bcf94dec5 2024-06-23)

Extra Info

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (19 by maintainers)

Commits related to this issue

Most upvoted comments

@sunshowers I don’t think the fix above would address that issue unfortunately – Jamey’s change removes recursion (in favor of iteration with an explicit stack) in the ISLE DSL-to-Rust compiler, but the generated Rust code that causes rust-lang/rust#128422 will be exactly the same. (They’re certainly related in the sense that the matcher decision tree gets quite deep!)