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

commented Jul 25, 2019

cc @RalfJung

fixes #62189

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 25, 2019

r? @estebank

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

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Jul 25, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-25T21:53:50.5074660Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-25T21:53:50.5258485Z ##[command]git config gc.auto 0
2019-07-25T21:53:50.5321878Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-25T21:53:50.5371285Z ##[command]git config --get-all http.proxy
2019-07-25T21:53:50.5497424Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62982/merge:refs/remotes/pull/62982/merge
---
2019-07-25T21:54:25.0970371Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-25T21:54:25.0970610Z 
2019-07-25T21:54:25.0970976Z   git checkout -b <new-branch-name>
2019-07-25T21:54:25.0971201Z 
2019-07-25T21:54:25.0971533Z HEAD is now at 3c326a6c6 Merge d9ac0c67ed5a3ea7d708894a4636a6e83c5aec49 into eedf6ce4ef54bb03818ab21d714f1b9f13a6b31c
2019-07-25T21:54:25.1095623Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-25T21:54:25.1098416Z ==============================================================================
2019-07-25T21:54:25.1098459Z Task         : Bash
2019-07-25T21:54:25.1098494Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-25T22:00:21.9746089Z    Compiling serde_json v1.0.40
2019-07-25T22:00:25.8346832Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-07-25T22:00:33.6614712Z     Finished release [optimized] target(s) in 1m 22s
2019-07-25T22:00:33.6675842Z tidy check
2019-07-25T22:00:33.9147658Z tidy error: /checkout/src/librustc_mir/interpret/memory.rs:538: line longer than 100 chars
2019-07-25T22:00:35.4949603Z some tidy checks failed
2019-07-25T22:00:35.4949722Z 
2019-07-25T22:00:35.4949722Z 
2019-07-25T22:00:35.4953435Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-07-25T22:00:35.4953538Z 
2019-07-25T22:00:35.4953560Z 
2019-07-25T22:00:35.4958173Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-07-25T22:00:35.4958226Z Build completed unsuccessfully in 0:01:25
2019-07-25T22:00:35.4958226Z Build completed unsuccessfully in 0:01:25
2019-07-25T22:00:36.9459161Z ##[error]Bash exited with code '1'.
2019-07-25T22:00:36.9513858Z ##[section]Starting: Checkout
2019-07-25T22:00:36.9515664Z ==============================================================================
2019-07-25T22:00:36.9515727Z Task         : Get sources
2019-07-25T22:00:36.9515785Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@estebank

This comment was marked as resolved.

Copy link
Contributor

commented Jul 25, 2019

tidy error: /checkout/src/librustc_mir/interpret/memory.rs:538: line longer than 100 chars

@RalfJung

This comment has been minimized.

Copy link
Member

commented Jul 26, 2019

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

@RalfJung
Copy link
Member

left a comment

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 some commits Jul 26, 2019

Update src/librustc_mir/interpret/memory.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
Update src/librustc_mir/interpret/memory.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
@RalfJung

This comment has been minimized.

Copy link
Member

commented Jul 27, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2019

📌 Commit 0cd7167 has been approved by RalfJung

Centril added a commit to Centril/rust that referenced this pull request Jul 27, 2019

Rollup merge of rust-lang#62982 - oli-obk:static_cycle, r=RalfJung
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

Auto merge of #63043 - Centril:rollup-f4baee4, r=Centril
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

@bors bors merged commit 0cd7167 into rust-lang:master Jul 27, 2019

4 checks passed

pr Build #20190726.60 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@RalfJung

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

Something in this rollup broke Miri on macOS, and it seems likely that it's this PR:

thread 'rustc' panicked at 'deallocated pointers should all be recorded in `dead_alloc_map`', src/libcore/option.rs:1166:5
return Ok((Size::from_bytes(alloc.bytes.len() as u64), alloc.align));
}
// Function pointers.
if let Ok(_) = self.get_fn_alloc(id) {

This comment has been minimized.

Copy link
@RalfJung

RalfJung Jul 28, 2019

Member

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

Rollup merge of rust-lang#63076 - RalfJung:miri-fn-ptr-alloc-size, r=…
…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

@nagisa nagisa added the beta-accepted label Aug 8, 2019

@Mark-Simulacrum Mark-Simulacrum referenced this pull request Aug 12, 2019

bors added a commit that referenced this pull request Aug 12, 2019

Auto merge of #63498 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
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 331e09b

bors added a commit that referenced this pull request Aug 12, 2019

Auto merge of #63498 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
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 331e09b

bors added a commit that referenced this pull request Aug 12, 2019

Auto merge of #63498 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
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 331e09b

bors added a commit that referenced this pull request Aug 13, 2019

Auto merge of #63498 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
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 331e09b

bors added a commit that referenced this pull request Aug 13, 2019

Auto merge of #63498 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
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 331e09b

Centril added a commit to Centril/rust that referenced this pull request Aug 14, 2019

Rollup merge of rust-lang#63075 - RalfJung:deref-checks, r=oli-obk
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

Rollup merge of rust-lang#63075 - RalfJung:deref-checks, r=oli-obk
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

Rollup merge of rust-lang#63075 - RalfJung:deref-checks, r=oli-obk
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

Rollup merge of rust-lang#63075 - RalfJung:deref-checks, r=oli-obk
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

Rollup merge of rust-lang#63075 - RalfJung:deref-checks, r=oli-obk
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.