about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-28 11:23:36 +0000
committerbors <bors@rust-lang.org>2023-04-28 11:23:36 +0000
commit1b55b3bcb098347257a884c470c35d98d35a33a7 (patch)
treeb35bc8d0d18faac211924303a489f488beb14ae1 /compiler/rustc_codegen_llvm/src/errors.rs
parenta0507192fbc2f23797ec17694747e9f4c75d845f (diff)
parent7566ed8ff4db1549feeaebe0ed1ca2e0de2c9c01 (diff)
downloadrust-1b55b3bcb098347257a884c470c35d98d35a33a7.tar.gz
rust-1b55b3bcb098347257a884c470c35d98d35a33a7.zip
Auto merge of #2828 - Vanille-N:tb-diags, r=RalfJung
Tree Borrows: improved diagnostics

Better diagnostics for Tree Borrows violations.

- Shows where the conflicting tags (the one that was accessed and the one that had a permission or protector that caused UB) were reborrowed, which is more readable than only `<TAG>`
- Shows a small history of what happened for the faulty tag to get there (which lines caused it to lose read/write permissions)
- Explains permissions and transitions in natural language (e.g. "does not have read permissions" instead of "is Disabled")

Not perfect, but at least testing TB will be less confusing.

Lack of range information from `RangeMap` makes selection of relevant events nontrivial: we reconstruct history from knowledge of `(initial, final)` and `(offset, pi, p'i)` so that `initial -> final = p1 -> p1' = p2 -> p2' = p3 -> ... = final `
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions