Skip to content

Drop alloca_zeroed - #22969

Merged
bors merged 1 commit into
rust-lang:masterfrom
dotdash:no_alloca_zeroed
Mar 3, 2015
Merged

Drop alloca_zeroed#22969
bors merged 1 commit into
rust-lang:masterfrom
dotdash:no_alloca_zeroed

Conversation

@dotdash

Copy link
Copy Markdown
Contributor

Its only user was lvalue_scratch_datum which is called with zero=true
anymore, so it's effectively unused.

Its only user was lvalue_scratch_datum which is called with zero=true
anymore, so it's effectively unused.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@nagisa

Copy link
Copy Markdown
Member

LGTM.

@huonw

huonw commented Mar 2, 2015

Copy link
Copy Markdown
Contributor

@bors r+ f580

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 3, 2015
 Its only user was lvalue_scratch_datum which is called with zero=true
anymore, so it's effectively unused.
@bors
bors merged commit f580412 into rust-lang:masterMar 3, 2015
@dotdash
dotdash deleted the no_alloca_zeroed branch May 8, 2015 08:46
Manishearth added a commit to Manishearth/rust that referenced this pull request Jan 14, 2016
…r-issue-30530, r=dotdash
Put back alloca zeroing for issues rust-lang#29092, rust-lang#30018, rust-lang#30530; inject zeroing for rust-lang#30822.
----
Background context: `fn alloca_zeroed` was removed in PR rust-lang#22969, so we haven't been "zero'ing" (\*) the alloca's since at least that point, but the logic behind that PR seems sound, so its not entirely obvious how *long* the underlying bug has actually been present. In other words, I have not yet done a survey to see when the new `alloc_ty` and `lvalue_scratch_datum` calls were introduced that should have had "zero'ing" the alloca's.
----
I first fixedrust-lang#30018, then decided to do a survey of `alloc_ty` calls to see if they needed similar treatment, which quickly led to a rediscovery of rust-lang#30530.
While making the regression test for the latter, I discovered rust-lang#30822, which is a slightly different bug (in terms of where the "zero'ing" needs to go), but still relevant.
I haven't finished the aforementioned survey of `fn alloc_ty` calls, but I decided I wanted to get this up for review in its current state (namely to see if my attempt to force developers to include a justification for passing `Uninit` can possibly fly, or if I should abandon that path of action).
----
(*): I am putting quotation marks around "zero'ing" because we no longer use zero as our "dropped" marker value.
Fixrust-lang#29092Fixrust-lang#30018Fixrust-lang#30530Fixrust-lang#30822
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 3, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@dotdash@rust-highfive@nagisa@huonw@bors