Skip to content

Verify that the Rust, C, and asm code all agree on alignments and other ABI issues for all types #629

@briansmith

Description

@briansmith

See #628 for background.

It's possible we might use a C compiler that has a different idea about alignment than the Rust compiler has. In particular, when the Rust compiler calls into C code, it might do so with objects that aren't aligned as much as the C code expects. Similarly with the asm code.

We already have some checks for primitive types using DEFINE_METRICS in C code and define_metrics_tests in Rust code. We could expand this to include all the non-primitive types shared between Rust and C too.

We should also see if we can somehow check "once and for all" that the ABIs match.

We might need to split checks/assurances for non-alignment ABI issues into a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions