Skip to content

fix(symcache): Plug soundness hole#958

Merged
loewenheim merged 4 commits intomasterfrom
sebastian/symcache-arch-pod
Feb 3, 2026
Merged

fix(symcache): Plug soundness hole#958
loewenheim merged 4 commits intomasterfrom
sebastian/symcache-arch-pod

Conversation

@loewenheim
Copy link
Contributor

Arch is a type for which Pod is not sound to implement because not every pattern of 32 bits is valid for it. This can be demonstrated by running the test_header_arch_from_bytes test under miri (before the fix):

❯ cargo +nightly miri test -p symbolic-symcache test_header_arch_from_bytes

The test itself uses unsafe, but only because I can't think of another way to obtain a 4-byte aligned slice of u8.

Copy link
Member

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

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

Oof!

pub(crate) debug_id: DebugId,
/// CPU architecture of the object file.
pub(crate) arch: Arch,
///
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
///

@loewenheim loewenheim merged commit f0dfcc1 into master Feb 3, 2026
16 checks passed
@loewenheim loewenheim deleted the sebastian/symcache-arch-pod branch February 3, 2026 18:08
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