Skip to content

fcmp_pp: get_output_ref_hash: fix aliasing, endianness, and 32-bit - #403

Open
jeffro256 wants to merge 1 commit into
seraphis-migration:fcmp++-stagefrom
jeffro256:fix_get_output_ref_hash
Open

fcmp_pp: get_output_ref_hash: fix aliasing, endianness, and 32-bit#403
jeffro256 wants to merge 1 commit into
seraphis-migration:fcmp++-stagefrom
jeffro256:fix_get_output_ref_hash

Conversation

@jeffro256

Copy link
Copy Markdown
Collaborator

variant_index size was different (4) on 32-bit systems. Its bytes were swapped on big-endian systems. And (crypto::public_key&)commitment is a strict aliasing violation.

@j-berman

Copy link
Copy Markdown
Collaborator

The variant index issue is addressed in #89 by using the output pair type instead of the variant index. Seems a saner cross-platform solution to use our own known indexing scheme to me

@jeffro256
jeffro256 force-pushed the fix_get_output_ref_hash branch from dbe2105 to 6d9faaf Compare July 6, 2026 05:44
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