Skip to content

Unaligned read of MIDIPacket::length triggers UB check in recent Rust #17

Closed
@Boddlnagg

Description

@Boddlnagg

See chris-zen/coremidi#49.

Because MIDIPackets are unaligned on non-ARM platforms, accesing their length and timeStamp fields must happen through read_unaligned. But this is not needed (and would produce worse machine code) on ARM.

These checks have been added in Rust 1.70 (https://releases.rs/docs/1.70.0/, rust-lang/rust#98112).

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