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

miri engine: Hooks for basic stacked borrows #55125

Merged
merged 14 commits into from
Oct 21, 2018

Conversation

RalfJung
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 16, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Oct 16, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Oct 16, 2018

📌 Commit 5b4c5de5f3c4a537d5dd8fc074e5619a47fd158c has been approved by oli-obk

@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 Oct 16, 2018
@RalfJung
Copy link
Member Author

@bors r=oli-obk

(I had pushed something here but force-pushed it away again.)

@bors
Copy link
Contributor

bors commented Oct 17, 2018

📌 Commit 5b4c5de5f3c4a537d5dd8fc074e5619a47fd158c has been approved by oli-obk

@RalfJung
Copy link
Member Author

@oli-obk I pushed some more commits, matching the stacked-borrows miri branch where the test suite all passes. :)

@rust-highfive

This comment has been minimized.

@@ -47,7 +46,19 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>

Misc => {
let src = self.read_value(src)?;
if self.type_is_fat_ptr(src_layout.ty) {

if src.layout.ty.is_region_ptr() && dest.layout.ty.is_unsafe_ptr() {
Copy link
Contributor

Choose a reason for hiding this comment

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

slightly unhappy about code that isn't needed during const eval but still will be compiled into const eval. Not sure what to do about that though

Copy link
Member Author

Choose a reason for hiding this comment

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

I cannot make it depend on enforce_validity() as that whitelists some functions in miri and I think my model might go crazy if references are only sometimes tracked.

I could add another const REF_TRACKING_HOOKS: bool though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea, not a blocker for this PR though

Copy link
Member Author

@RalfJung RalfJung Oct 17, 2018

Choose a reason for hiding this comment

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

I'll forget it if I don't do it now, and this PR is still quite far up the queue anyway.^^

I might have to include a miri module update as well as we are nearing the week where we cannot break tools.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 17, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2018

📌 Commit eb5c69b33c30bca5ebb954caae337c33748368eb has been approved by oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented Oct 17, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2018

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Oct 17, 2018

📌 Commit eb5c69b33c30bca5ebb954caae337c33748368eb has been approved by oli-obk

@RalfJung
Copy link
Member Author

Fixed your nit, and included rust-lang/miri#487 so that the miri submodule keeps working.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 17, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2018

📌 Commit 4e784583aab5ec6ff083e47cb0c3d7fa3518d330 has been approved by oli-obk

@bors
Copy link
Contributor

bors commented Oct 18, 2018

☔ The latest upstream changes (presumably #55171) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 18, 2018
@bors
Copy link
Contributor

bors commented Oct 18, 2018

📌 Commit 50d5cde2dd6b1ae80c170ff873453699d061278b has been approved by oli-obk

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 18, 2018
@bors
Copy link
Contributor

bors commented Oct 20, 2018

⌛ Testing commit 50d5cde2dd6b1ae80c170ff873453699d061278b with merge c90f034f45dff5d7d4865259634139ca1cc03bf1...

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 20, 2018
@RalfJung
Copy link
Member Author

Fixed by disabling a new miri test on Windows and macOS, where I cannot test them.

This can be much easier debugged on the miri side once things landed in rustc.

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Oct 20, 2018

📌 Commit 3f5b550 has been approved by oli-obk

@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 Oct 20, 2018
@bors
Copy link
Contributor

bors commented Oct 21, 2018

⌛ Testing commit 3f5b550 with merge 3779b93f1bdcfa9c7ded680a7b2d715a24c688da...

@bors
Copy link
Contributor

bors commented Oct 21, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-aux of your PR failed on Travis (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.
[01:42:38] [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "cargotest", path: "src/tools/cargotest", mode: ToolBootstrap, is_optional_tool: false, source_type: InTree, extra_features: [] } -- 1.158
[01:42:39] testing https://github.com/servo/webrender
[01:42:39] Initialized empty Git repository in /checkout/obj/build/ct/webrender/.git/
[01:42:39] fatal: Could not parse object '57250b2b8fa63934f80e5376a29f7dcb3f759ad6'.
[01:42:59] fatal: unable to access 'https://github.com/servo/webrender/': Could not resolve host: github.com
[01:42:59] thread 'main' panicked at 'assertion failed: status.success()', tools/cargotest/main.rs:128:13
[01:42:59] 
[01:42:59] 
[01:42:59] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargotest" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/ct"
[01:42:59] expected success, got: exit code: 101
[01:42:59] expected success, got: exit code: 101
[01:42:59] 
[01:42:59] 
[01:42:59] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:42:59] Build completed unsuccessfully in 0:42:57
[01:42:59] make: *** [check-aux] Error 1
[01:42:59] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:002c04c2
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:08ffb750:start=1540104389904852277,finish=1540104389914872150,duration=10019873
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0096690f
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1be205b0
travis_time:start:1be205b0
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:18508c29
$ dmesg | grep -i kill

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)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 21, 2018
@kennytm
Copy link
Member

kennytm commented Oct 21, 2018

@bors retry travis-ci/travis-ci#9696

@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 Oct 21, 2018
@bors
Copy link
Contributor

bors commented Oct 21, 2018

⌛ Testing commit 3f5b550 with merge 66910ba...

bors added a commit that referenced this pull request Oct 21, 2018
miri engine: Hooks for basic stacked borrows

r? @oli-obk
@bors
Copy link
Contributor

bors commented Oct 21, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: oli-obk
Pushing 66910ba to master...

@bors bors merged commit 3f5b550 into rust-lang:master Oct 21, 2018
@RalfJung RalfJung mentioned this pull request Oct 22, 2018
@RalfJung RalfJung deleted the stacked-borrows branch November 9, 2018 15:34
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants