Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't access a static just for its size and alignment #62982

Merged
merged 7 commits into from
Jul 27, 2019

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 25, 2019

cc @RalfJung

fixes #62189

@rust-highfive
Copy link
Collaborator

r? @estebank

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 25, 2019
@oli-obk oli-obk added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 25, 2019
@rust-highfive

This comment has been minimized.

@estebank

This comment has been minimized.

@RalfJung
Copy link
Member

r? @RalfJung

@rust-highfive rust-highfive assigned RalfJung and unassigned estebank Jul 26, 2019
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with these nits fixed and CI green

src/librustc_mir/interpret/memory.rs Outdated Show resolved Hide resolved
src/librustc_mir/interpret/memory.rs Outdated Show resolved Hide resolved
oli-obk and others added 2 commits July 26, 2019 17:43
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Ralf Jung <post@ralfj.de>
@RalfJung
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 27, 2019

📌 Commit 0cd7167 has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 27, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 27, 2019
Don't access a static just for its size and alignment

cc @RalfJung

fixes rust-lang#62189
bors added a commit that referenced this pull request Jul 27, 2019
Rollup of 6 pull requests

Successful merges:

 - #62423 (Fix cycle error with existential types)
 - #62979 (Cleanup save-analysis JsonDumper)
 - #62982 (Don't access a static just for its size and alignment)
 - #63013 (add `repr(transparent)` to `IoSliceMut` where missing)
 - #63014 (Stop bare trait lint applying to macro call sites)
 - #63036 (Add lib section to rustc_lexer's Cargo.toml)

Failed merges:

r? @ghost
return Ok((Size::from_bytes(alloc.bytes.len() as u64), alloc.align));
}
// Function pointers.
if let Ok(_) = self.get_fn_alloc(id) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is the bug that I missed. We no longer check the "machine" function pointers.

Centril added a commit to Centril/rust that referenced this pull request Jul 29, 2019
…oli-obk

Miri: fix determining size of an "extra function" allocation

Fixes [a bug](rust-lang/miri#862) introduced by rust-lang#62982. Best reviewed commit-by-commit.

r? @oli-obk
@pietroalbini pietroalbini added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 3, 2019
@nagisa nagisa added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 8, 2019
@pietroalbini pietroalbini added beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. and removed beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Aug 12, 2019
@Mark-Simulacrum Mark-Simulacrum mentioned this pull request Aug 12, 2019
bors added a commit that referenced this pull request Aug 13, 2019
1.37.0 stable

This promotes beta to stable and backports a few PRs:

 - Avoid ICE when referencing desugared local binding in borrow error (#63051)
 - Don't access a static just for its size and alignment (#62982) via 331e09b143aebfcf82dc1f9b69b31ee0083cbf0b
bors added a commit that referenced this pull request Aug 13, 2019
1.37.0 stable

This promotes beta to stable and backports a few PRs:

 - Avoid ICE when referencing desugared local binding in borrow error (#63051)
 - Don't access a static just for its size and alignment (#62982) via 331e09b143aebfcf82dc1f9b69b31ee0083cbf0b
Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019
Miri: Check that a ptr is aligned and inbounds already when evaluating `*`

This syncs Miri with what the Nomicon and the Reference say, and resolves rust-lang/miri#447.

Also this would not have worked without rust-lang#62982 due to new cycles. ;)

r? @oli-obk
Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019
Miri: Check that a ptr is aligned and inbounds already when evaluating `*`

This syncs Miri with what the Nomicon and the Reference say, and resolves rust-lang/miri#447.

Also this would not have worked without rust-lang#62982 due to new cycles. ;)

r? @oli-obk
Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019
Miri: Check that a ptr is aligned and inbounds already when evaluating `*`

This syncs Miri with what the Nomicon and the Reference say, and resolves rust-lang/miri#447.

Also this would not have worked without rust-lang#62982 due to new cycles. ;)

r? @oli-obk
Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019
Miri: Check that a ptr is aligned and inbounds already when evaluating `*`

This syncs Miri with what the Nomicon and the Reference say, and resolves rust-lang/miri#447.

Also this would not have worked without rust-lang#62982 due to new cycles. ;)

r? @oli-obk
Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019
Miri: Check that a ptr is aligned and inbounds already when evaluating `*`

This syncs Miri with what the Nomicon and the Reference say, and resolves rust-lang/miri#447.

Also this would not have worked without rust-lang#62982 due to new cycles. ;)

r? @oli-obk
@pietroalbini pietroalbini removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 21, 2019
@nikomatsakis
Copy link
Contributor

Reviewed by the compiler team:

Accepted for beta backport

@RalfJung
Copy link
Member

Didn't this land before the current beta branched?

@nikomatsakis
Copy link
Contributor

I'm going to remove the beta nominated label. It seems like it either landed or got rolle up or something.

@nikomatsakis nikomatsakis removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 29, 2019
@RalfJung
Copy link
Member

I also last-minute backported it to stable. Maybe that's where the confusion comes from.

@Mark-Simulacrum
Copy link
Member

This indeed made it into (current) beta I believe as part of a5e7bb3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static cyclic references not compiled in current nightly rust version
9 participants