from_u32_unchecked: check validity, and fix UB in Wtf8#72683
from_u32_unchecked: check validity, and fix UB in Wtf8#72683bors merged 5 commits intorust-lang:masterfrom
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
6b4566d to
1956ada
Compare
|
@bors r+ |
|
📌 Commit 1956ada4c855673de327f16c91d11fdc4cd5a39c has been approved by |
|
@bors r- |
1956ada to
52ed89a
Compare
|
@Mark-Simulacrum I fixed the endless recursion. |
|
r? @Mark-Simulacrum |
|
@bors r+ No worries! |
|
📌 Commit 52ed89a has been approved by |
…imulacrum from_u32_unchecked: check validity when debug assertions are enabled
|
This actually caused CI to fail in #72736 (comment) @bors r- Our wtf8 code seems to have UB.^^ |
|
@SimonSapin I implemented the fix you suggested here. |
dc8c1a0 to
9c627c3
Compare
|
r=me with comment added, unless you want to wait for @SimonSapin's review in particular (but AFAICT this is just moving some code around so I feel comfortable approving) |
|
I added comments but tried to avoid claiming that this is valid UTF-8... what do you think? |
05520e4 to
96615ce
Compare
96615ce to
0fb6e63
Compare
|
@bors r=Mark-Simulacrum |
|
📌 Commit 0fb6e63 has been approved by |
…imulacrum from_u32_unchecked: check validity, and fix UB in Wtf8 Fixes rust-lang#72760
Rollup of 5 pull requests Successful merges: - rust-lang#72683 (from_u32_unchecked: check validity, and fix UB in Wtf8) - rust-lang#72715 (Account for trailing comma when suggesting `where` clauses) - rust-lang#72745 (generalize Borrow<[T]> for Interned<'tcx, List<T>>) - rust-lang#72749 (Update stdarch submodule to latest head) - rust-lang#72781 (Use `LocalDefId` instead of `NodeId` in `resolve_str_path_error`) Failed merges: r? @ghost
test WTF8 encoding corner cases This adds a Miri-side test for rust-lang/rust#72760. Blocked on rust-lang/rust#72683.
Fixes #72760