From 1b576dcb2ed7ec7903b715f37125a955802c9701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Walter?= Date: Tue, 4 Feb 2025 12:24:44 +0100 Subject: [PATCH 1/2] Overwrite to None if n=0 --- vm/src/vm/vm_core.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vm/src/vm/vm_core.rs b/vm/src/vm/vm_core.rs index c04fd3721e..25b7225265 100644 --- a/vm/src/vm/vm_core.rs +++ b/vm/src/vm/vm_core.rs @@ -1119,6 +1119,9 @@ impl VirtualMachine { VirtualMachineError, > { if let Some((ptr, n)) = mod_params { + if n == 0 { + return Ok(None); + } let mod_builtin = self .builtin_runners .iter() From 8a6cbb99d610178718c490e2c4b85b3b5fe567c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Walter?= Date: Wed, 5 Feb 2025 12:10:29 +0100 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be252bc857..1ce5e303a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ #### Upcoming Changes +* fix: `mod_builtin_fill_memory` raises when `n=0` [#1935](https://github.com/lambdaclass/cairo-vm/pull/1935) + * fix(BREAKING): Fix no trace padding flow in proof mode [#1909](https://github.com/lambdaclass/cairo-vm/pull/1909) * refactor: Limit ret opcode decodeing to Cairo0's standards. [#1925](https://github.com/lambdaclass/cairo-vm/pull/1925)