hyperium / hyperium/hyper

Backport fixes to use of `mem::uninitialized` to older versions?

Open
#2,914 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

Background: In https://github.com/rust-lang/rust/issues/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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the 0.13.x and 0.12.x branches, focusing on the older uses of mem::uninitialized and the mentioned httparse::EMPTY_HEADER and bytes dependencies. Compare the already-fixed 0.14 version for guidance, then verify that compatible branch releases avoid the reported regressions without introducing an unacceptable MSRV change.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.