Skip to content

IGVM crate affected by apparent compiler regression in nightly optimized builds #80

@AdamCDunlap

Description

@AdamCDunlap

This is mostly a FYI, but an apparent rust compiler regression caused some code in this crate to start crashing with SIGILL. The function IgvmDirectiveHeader::write_binary_header can crash this way when given a IgvmDirectiveHeader::SnpVpContext variant. It only happens when the opt-level is higher than 1 and only with the rust nightly compiler. This is tracked in rust-lang/rust#136361, and the issue contains some more details about exactly which versions of rust may be affected.

There's no indication that any of code in this crate is buggy since it's just in safe code, but there's a possibility the zerocopy dependency is doing something unsound with unsafe code.

This issue wasn't found in this crate's tests, it was only found in some of our integration tests, so it might make sense to increase test coverage of this part of IgvmDirectiveHeader::write_binary_header. While narrowing down our failing test it was pretty easy to reproduce the crash so I think even weak coverage would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions