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

jit: correctly load the StableResult discriminant in emit_result_is_err #514

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

alessandrod
Copy link

StableResult is #[repr(C, u64)] which means that the layout is:

[u64 discriminant]
[union of all the data carried by the variants]

We were accessing the data of the Ok variant.

@Lichtso
Copy link

Lichtso commented Sep 14, 2023

Can we have a test for this?

@Lichtso Lichtso force-pushed the is-err-discriminant branch 2 times, most recently from 823514e to ede6335 Compare September 25, 2023 10:30
src/vm.rs Outdated Show resolved Hide resolved
StableResult is #[repr(C, u64)] which means that the layout is

[u64 discriminant]
[union of all the data carried by the variants]

We were accessing the data of the Ok variant.
@Lichtso Lichtso merged commit dd1ecc0 into solana-labs:main Sep 25, 2023
12 checks passed
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