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

Rustup #2719

Merged
merged 34 commits into from
Dec 9, 2022
Merged

Rustup #2719

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
068470c
Auto merge of #105176 - klensy:docker-smol, r=Mark-Simulacrum
bors Dec 5, 2022
6b1bcf0
Rollup merge of #104912 - RalfJung:per, r=Mark-Simulacrum
matthiaskrgr Dec 5, 2022
e53ba83
Rollup merge of #104952 - jyn514:setup, r=Mark-Simulacrum
matthiaskrgr Dec 5, 2022
b26bf24
Rollup merge of #104953 - jyn514:fewer-submodule-updates, r=Mark-Simu…
matthiaskrgr Dec 5, 2022
d26ac3f
Rollup merge of #105180 - nbdd0121:async_track_caller, r=compiler-errors
matthiaskrgr Dec 5, 2022
877155e
Rollup merge of #105222 - devnexen:fbsd_update_img, r=petrochenkov
matthiaskrgr Dec 5, 2022
30673d2
Rollup merge of #105223 - lukas-code:(ExprWithBlock), r=petrochenkov
matthiaskrgr Dec 5, 2022
2ba40ec
Rollup merge of #105230 - cjgillot:issue-104312, r=petrochenkov
matthiaskrgr Dec 5, 2022
21ddaf1
Rollup merge of #105301 - RalfJung:miri, r=oli-obk
matthiaskrgr Dec 5, 2022
d35ad1a
Auto merge of #105328 - matthiaskrgr:rollup-qnfksmq, r=matthiaskrgr
bors Dec 5, 2022
f5a5819
Auto merge of #105119 - JakobDegen:inline-experiments, r=cjgillot
bors Dec 6, 2022
a34a0c9
Auto merge of #105220 - oli-obk:feeding, r=cjgillot
bors Dec 6, 2022
31a8603
Auto merge of #105175 - michaelwoerister:add-stable-ord-trait, r=nagisa
bors Dec 6, 2022
37d76c6
make retagging work even with 'unstable' places
RalfJung Dec 5, 2022
c12f02e
Stacked Borrows: factor the logic determining the new permissions on …
RalfJung Dec 5, 2022
820d125
Auto merge of #105229 - saethlin:zst-writes-to-unions, r=oli-obk
bors Dec 6, 2022
8ff7c21
Auto merge of #105271 - eduardosm:inline-always-int-conv, r=scottmcm
bors Dec 6, 2022
4cbcf32
Auto merge of #105291 - nnethercote:remove-LintPassObjects, r=cjgillot
bors Dec 7, 2022
4fcc512
Auto merge of #104799 - pcc:linkage-fn, r=tmiasko
bors Dec 7, 2022
98ad06d
Auto merge of #103459 - ChrisDenton:propagate-nulls, r=thomcc
bors Dec 7, 2022
6133903
Rollup merge of #104922 - estebank:fur-elize, r=oli-obk
matthiaskrgr Dec 8, 2022
5455716
Rollup merge of #105120 - solid-rs:patch/kmc-solid/maintainance, r=th…
matthiaskrgr Dec 8, 2022
3abccef
Rollup merge of #105255 - cjgillot:issue-105197, r=compiler-errors
matthiaskrgr Dec 8, 2022
cea8099
Rollup merge of #105317 - RalfJung:retag-rework, r=oli-obk
matthiaskrgr Dec 8, 2022
60c96e6
Rollup merge of #105405 - sunfishcode:sunfishcode/export-dynamic, r=T…
matthiaskrgr Dec 8, 2022
bf75f03
Rollup merge of #105408 - cuviper:help-rpitirpit, r=compiler-errors
matthiaskrgr Dec 8, 2022
7248990
Rollup merge of #105423 - oli-obk:symbols, r=jackh726
matthiaskrgr Dec 8, 2022
8085ee7
Rollup merge of #105433 - ComputerDruid:docker_continuation_fix, r=jy…
matthiaskrgr Dec 8, 2022
a9f1cc7
Rollup merge of #105434 - nbdd0121:lib, r=thomcc
matthiaskrgr Dec 8, 2022
51f7122
Rollup merge of #105441 - nnethercote:rm-UnsafetyState, r=lcnr
matthiaskrgr Dec 8, 2022
0208c4c
Auto merge of #105456 - matthiaskrgr:rollup-yennygf, r=matthiaskrgr
bors Dec 9, 2022
4d69711
Preparing for merge from rustc
RalfJung Dec 9, 2022
2be695b
Merge from rustc
RalfJung Dec 9, 2022
bb7c9e7
fmt and clippy
RalfJung Dec 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
203c8765ea33c65d888febe0e8219c4bb11b0d89
7701a7e7d4eed74a106f39fa64899dffd1e1025f
21 changes: 18 additions & 3 deletions src/borrow_tracker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use rustc_target::abi::Size;

use crate::*;
pub mod stacked_borrows;
use stacked_borrows::diagnostics::RetagCause;

pub type CallId = NonZeroU64;

Expand Down Expand Up @@ -265,11 +264,27 @@ impl GlobalStateInner {

impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
fn retag(&mut self, kind: RetagKind, place: &PlaceTy<'tcx, Provenance>) -> InterpResult<'tcx> {
fn retag_ptr_value(
&mut self,
kind: RetagKind,
val: &ImmTy<'tcx, Provenance>,
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>> {
let this = self.eval_context_mut();
let method = this.machine.borrow_tracker.as_ref().unwrap().borrow().borrow_tracker_method;
match method {
BorrowTrackerMethod::StackedBorrows => this.sb_retag_ptr_value(kind, val),
}
}

fn retag_place_contents(
&mut self,
kind: RetagKind,
place: &PlaceTy<'tcx, Provenance>,
) -> InterpResult<'tcx> {
let this = self.eval_context_mut();
let method = this.machine.borrow_tracker.as_ref().unwrap().borrow().borrow_tracker_method;
match method {
BorrowTrackerMethod::StackedBorrows => this.sb_retag(kind, place),
BorrowTrackerMethod::StackedBorrows => this.sb_retag_place_contents(kind, place),
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/borrow_tracker/stacked_borrows/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,12 @@ impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {
Operation::Dealloc(_) => format!(" due to deallocation"),
Operation::Access(AccessOp { kind, tag, .. }) =>
format!(" due to {kind:?} access for {tag:?}"),
Operation::Retag(RetagOp { orig_tag, permission, .. }) => {
Operation::Retag(RetagOp { orig_tag, permission, new_tag, .. }) => {
let permission = permission
.expect("start_grant should set the current permission before popping a tag");
format!(" due to {permission:?} retag from {orig_tag:?}")
format!(
" due to {permission:?} retag from {orig_tag:?} (that retag created {new_tag:?})"
)
}
};

Expand Down
Loading