Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions tests/integration/src/rust_masm_tests/rust_sdk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,6 @@ impl Note {
test.compile_package();
}

/// Regression test for https://github.com/0xMiden/compiler/issues/831
///
/// Previously, compilation could panic during MASM codegen with:
/// `invalid stack offset for movup: 16 is out of range`.
#[test]
fn rust_sdk_invalid_stack_offset_movup_16_issue_831() {
let config = WasmTranslationConfig::default();
let mut test = CompilerTest::rust_source_cargo_miden(
"../rust-apps-wasm/rust-sdk/issue-invalid-stack-offset-movup",
config,
[],
);

// Ensure the crate compiles all the way to a package. This previously triggered the #831
// panic in MASM codegen.
let package = test.compile_package();
}

#[test]
fn rust_sdk_cross_ctx_account_and_note() {
let config = WasmTranslationConfig::default();
Expand Down
8 changes: 8 additions & 0 deletions tests/lit/swapp/codegen_succeeds.masm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
;; Regression test for https://github.com/0xMiden/compiler/issues/831
;;
;; Previously, compilation could panic during MASM codegen with:
;; `invalid stack offset for movup: 16 is out of range`.
;;
;; RUN: env CARGO_TARGET_DIR=%target_dir/lit/swapp cargo miden build --release --manifest-path %S/test-project/Cargo.toml 2>&1 | filecheck %s

;; CHECK-NOT: error
8 changes: 8 additions & 0 deletions tests/lit/swapp/issue831.masm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
;; Regression test for https://github.com/0xMiden/compiler/issues/831
;;
;; Verifies that compilation does not panic with:
;; `invalid stack offset for movup: 16 is out of range`
;;
;; RUN: env CARGO_TARGET_DIR=%target_dir/lit/swapp cargo miden build --release --manifest-path %S/test-project/Cargo.toml 2>&1 | filecheck %s

;; CHECK-NOT: invalid stack offset for movup: 16 is out of range
5 changes: 5 additions & 0 deletions tests/lit/swapp/lit.suite.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name = "swapp"
patterns = ["*.masm"]
working_dir = "../../../"

[format.shtest]