0xMiden / 0xMiden/protocol

Test all kernel and library procedures with additional stack elements

Offen
#675 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
132
Forks
167
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
110

Beschreibung

### What should be done?

Ensuring the procedures in the stdlib and the kernel ABI is correct is a requirement to build programs on top of it. Some of our procedures are not properly handling the stack, either they consume additional elements from the stack or leave elements in the stack, and this is not caught by the tests because the VM automatically fills the top of the stack with zeros.

To caught issues like the ones mentioned above, our tests should add random elements to the stack before calling any procedure, and asserting said elements are still available in the stack after the procedure call.

### How should it be done?

Change existing tests to:

- Initialize the stack with more elements than required prior to a procedure call
- Assert the elements mentioned above are untouched after calling the above procedure

### When is this task done?

When the existing tests have been updated

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.