Fix hashing of span end columns in incremental compilation - #162250
Conversation
|
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
Signed-off-by: cuishuang <imcusg@gmail.com>
Fix hashing of span end columns in incremental compilation `stable_hash_span` packs the span start/end line and column together with its length, but the `col_hi` mask was shifted before being applied, so the end column was effectively omitted from the hash. Parenthesize the mask operation so `col_hi` is masked with `0xFF` before being shifted into bits 32..39.
Rollup of 14 pull requests Successful merges: - #162324 (miri subtree update) - #162170 (bootstrap: use target's LLVM libdir when cross-compiling) - #158312 (Adds support for AArch64 SVE to inline assembly) - #159792 (A more readable debug map for IndexMaps) - #160745 (make closures act like MaybeDangling) - #161263 (break rustc_expand-rustc_middle dependency) - #161895 (std::sys::pal::sgx: fix mismatched alloc/free alignment) - #161940 (Promote `wasm32-wasip3` to a tier 2 target) - #161397 (coverage: Tidy tests and add some new ones) - #161616 (Report precondition violation for `<usize as SliceIndex>::get_unchecked` in const-eval) - #162248 (Add regression test for unsized const parameter default ICE) - #162250 (Fix hashing of span end columns in incremental compilation) - #162265 (cargotest: add lockfiles) - #162318 (bootstrap: Fix broken path for `./x doc compiler/rustc --open`)
Rollup merge of #162250 - cuishuang:master, r=mu001999 Fix hashing of span end columns in incremental compilation `stable_hash_span` packs the span start/end line and column together with its length, but the `col_hi` mask was shifted before being applied, so the end column was effectively omitted from the hash. Parenthesize the mask operation so `col_hi` is masked with `0xFF` before being shifted into bits 32..39.
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (6f0ae4f): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 6.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.5%, secondary 3.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: missing data |
Rollup of 14 pull requests Successful merges: - rust-lang/rust#162324 (miri subtree update) - rust-lang/rust#162170 (bootstrap: use target's LLVM libdir when cross-compiling) - rust-lang/rust#158312 (Adds support for AArch64 SVE to inline assembly) - rust-lang/rust#159792 (A more readable debug map for IndexMaps) - rust-lang/rust#160745 (make closures act like MaybeDangling) - rust-lang/rust#161263 (break rustc_expand-rustc_middle dependency) - rust-lang/rust#161895 (std::sys::pal::sgx: fix mismatched alloc/free alignment) - rust-lang/rust#161940 (Promote `wasm32-wasip3` to a tier 2 target) - rust-lang/rust#161397 (coverage: Tidy tests and add some new ones) - rust-lang/rust#161616 (Report precondition violation for `<usize as SliceIndex>::get_unchecked` in const-eval) - rust-lang/rust#162248 (Add regression test for unsized const parameter default ICE) - rust-lang/rust#162250 (Fix hashing of span end columns in incremental compilation) - rust-lang/rust#162265 (cargotest: add lockfiles) - rust-lang/rust#162318 (bootstrap: Fix broken path for `./x doc compiler/rustc --open`)
stable_hash_spanpacks the span start/end line and column together with its length, but thecol_himask was shifted before being applied, so the end column was effectively omitted from the hash.Parenthesize the mask operation so
col_hiis masked with0xFFbefore being shifted into bits 32..39.