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

Fix small continuations issue #1949

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Fix small continuations issue #1949

merged 1 commit into from
Oct 24, 2024

Conversation

leonardoalt
Copy link
Member

I ran into this unwrapping a None when using continuations with a very low max degree. It's kinda hard to trigger without triggering a bunch of other issues, but I think this fix is enough for now: if a register is never used it is not contained in the snapshot, so it should be 0.

*register_memory_snapshot.get(&(id as u32)).unwrap()
*register_memory_snapshot
.get(&(id as u32))
.unwrap_or(&0.into())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine i think, but i wonder is the executor itself should take care of this (zero out unused registers)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for that it would have to know which registers we're using

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm right

*register_memory_snapshot.get(&(id as u32)).unwrap()
*register_memory_snapshot
.get(&(id as u32))
.unwrap_or(&0.into())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm right

@Schaeff Schaeff added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit ca4aa34 Oct 24, 2024
14 checks passed
@Schaeff Schaeff deleted the fix-cont branch October 24, 2024 22:19
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.

3 participants