Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No deploy nullptrs (except deprecated) #428

Closed
wants to merge 9 commits into from

Conversation

notlesh
Copy link
Collaborator

@notlesh notlesh commented Nov 7, 2024

This is the same as #427 except that the OS still uses cast(0, felt*) during deprecated deploys.

The changes to the OS are effectively:

diff --git a/src/starkware/starknet/core/os/execution/deprecated_execute_entry_point.cairo b/src/starkware/starknet/core/os/execution/deprecated_execute_entry_point.cairo
index d147c23f7b..e329f5855d 100644
--- a/src/starkware/starknet/core/os/execution/deprecated_execute_entry_point.cairo
+++ b/src/starkware/starknet/core/os/execution/deprecated_execute_entry_point.cairo
@@ -128,7 +128,7 @@ func deprecated_execute_entry_point{
         // Assert that there is no call data in the case of NOP entry point.
         assert execution_context.calldata_size = 0;
         %{ execution_helper.skip_call() %}
-        return (retdata_size=0, retdata=cast(0, felt*));
+        return (retdata_size=0, retdata=cast(nondet %{ segments.add() %}, felt*));
     }

     local range_check_ptr = range_check_ptr;

diff --git a/src/starkware/starknet/core/os/execution/execute_entry_point.cairo b/src/starkware/starknet/core/os/execution/execute_entry_point.cairo
index ef2ca40441..7b32e759af 100644
--- a/src/starkware/starknet/core/os/execution/execute_entry_point.cairo
+++ b/src/starkware/starknet/core/os/execution/execute_entry_point.cairo
@@ -171,7 +171,7 @@ func execute_entry_point{
         // Assert that there is no call data in the case of NOP entry point.
         assert execution_context.calldata_size = 0;
         %{ execution_helper.skip_call() %}
-        return (retdata_size=0, retdata=cast(0, felt*));
+        return (retdata_size=0, retdata=cast(nondet %{ segments.add() %}, felt*));
     }

     let entry_point_offset = compiled_class_entry_point.offset;

@notlesh notlesh requested a review from HermanObst as a code owner November 7, 2024 19:49
@notlesh
Copy link
Collaborator Author

notlesh commented Dec 9, 2024

Closing as this issue was addressed in cairo-vm

@notlesh notlesh closed this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants