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

crux-mir: remove default initialValue for crucible::any::Any #947

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

spernsteiner
Copy link
Contributor

Previously, locals of type Any would be initialized to a (useless) default value. If the local was declared under a symbolic branch, then the value assigned under that branch would then get muxed with the default value, producing an error ("Attempted to mux ANY values of different runtime type") since the value assigned almost never had the same concrete/runtime type as the default. This was a major problem for #945, which halts simulation when that error occurs instead of turning it into an assertion failure.

With this branch, we no longer set a default value for Any-typed locals. (I forget the exact mechanism that allows this - probably something involving MaybeType - but the same mechanism is already used for various other non-defaultable types, like function pointers.) Removing the default value eliminates the unnecessary mux and the associated error.

Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

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

LGTM

CI failure appears unrelated.

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