Skip to content

Backport fixes to use of mem::uninitialized to older versions? #2914

Open
@5225225

Description

@5225225

Background: In rust-lang/rust#66151 we're adding more strict checks in order to detect invalid use of mem::uninitialized/mem::zeroed, and older versions of hyper run into this check, so it would be good to have semver compatible versions that people can cargo update -p hyper to in order to get their code working again.

0.11 is the oldest version that anyone ran into the issue on, and out of 136 regressions, there were only 4. So just publishing a fix to 0.12 (25 regressions) and 0.13 (52 regressions) would fix most of the issues. The rest of the regressions are on 0.14, but that's got a fixed version published on it, so there's nothing more to do there. (Granted, these numbers might be somewhat off because it's an old crater run, but from checking a few of them at random, there's not many that published an update since).

I'm up for doing the work needed here, I assume I'd just make a pull request to the 0.13.x / 0.12.x branch? It would lead to a perf regression to do the simplest thing of just using mem::zeroed / httparse::EMPTY_HEADER, but that seems acceptable since the crate would still at least work and not panic. Also, 0.12.x might need a bytes bump to not run into use of uninit bytes from there, which might be a MSRV bump, but again, I feel that's better than it not working.

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