Skip to content

Fix issues in order to re-enable Miri #446

@EmilyMatt

Description

@EmilyMatt

There are some issues currently preventing Miri runs.
While attempting to fix those and run miri, I found other problems in various code paths, Will use this ticket as a centralized board for them.

Duplicate String Writing:

serde::se::pp::test::prettyfy failed because it wrote duplicate strings due to a bug in value-trait:
Issue has a PR attached as well
simd-lite/value-trait#62

Calling alloc(0) is undefined behaviour and should be forbidden and handled.
#442

Calling .as_mut_ptr() numerous time on a slice is not allowed as Miri's borrow checker considers the mut borrow invalidated:
#443

Unrolling using SSSE3 features does not require SSSE3 at runtime, and may reach "invalid instruction":
#444

No UTF-8 validation happening at all in one of the code paths:
#445

After these, the only thing blocking from running miri is a couple of things marked unused for some reason when running miri, did not debug too deeply, but just adding #[cfg(not(miri))] on them was enough to get it to run

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