Skip to content

Cross-function union instrumentation#3465

Merged
celinval merged 11 commits intomodel-checking:mainfrom
artemagvanian:cross-function-unions
Sep 4, 2024
Merged

Cross-function union instrumentation#3465
celinval merged 11 commits intomodel-checking:mainfrom
artemagvanian:cross-function-unions

Conversation

@artemagvanian
Copy link
Contributor

This PR introduces support for memory initialization checks for unions passed across the function boundary.

Whenever a union is passed as an argument, we need to make sure that its initialization state is preserved. Unlike pointers, unions do not have a stable memory address which could identify them in shadow memory. Hence, we need to pass extra information across function boundary since unions are passed “by value”.

We introduce a global variable to store the previous address of unions passed as function arguments, which allows us to effectively tie the initialization state of unions passed between functions. This struct is written to by the caller and read from by the callee.

For more information about planned functionality, see #3300

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@github-actions github-actions bot added the Z-EndToEndBenchCI Tag a PR to run benchmark CI label Aug 27, 2024
@artemagvanian artemagvanian marked this pull request as ready for review August 28, 2024 23:06
@artemagvanian artemagvanian requested a review from a team as a code owner August 28, 2024 23:06
Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

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

Thanks Artem! It's looking good.

Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

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

Thanks @artemagvanian!

@celinval celinval enabled auto-merge September 4, 2024 02:13
@celinval celinval added this pull request to the merge queue Sep 4, 2024
Merged via the queue into model-checking:main with commit 93a29af Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants