-
Notifications
You must be signed in to change notification settings - Fork 13.3k
transmutability: unexpected behaviour when both init and uninit transitions are present #140337
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
Comments
Currently an uninit transition matches both an uninit byte and all values in I was thinking about addressing this by changing uninit transition to match |
Our union support has some potential soundness holes, since the validity rules of unions aren't fully decided. See here for a description of the issue and the solution we'd like to work towards: rust-lang/project-safe-transmute#19 That aside, the issue you've found is very weird and we should fix it. There's no good reason those two middle tests should behave differently, and I don't yet follow why that would be the case. |
transmutability: uninit transition matches unit byte only The previous implementation was inconsistent about transitions that apply for an init byte. For example, when answering a query, an init byte could use corresponding init transition. Init byte could also use uninit transition, but only when the corresponding init transition was absent. This behaviour was incompatible with DFA union construction. Define an uninit transition to match an uninit byte only and update implementation accordingly. To describe that `Tree::uninit` is valid for any value, build an automaton that accepts any byte value. Additionally, represent byte ranges uniformly as a pair of integers to avoid special case for uninit byte. Fixes rust-lang#140337. Fixes rust-lang#140168 (comment). r? `@jswrenn` `@joshlf`
transmutability: uninit transition matches unit byte only The previous implementation was inconsistent about transitions that apply for an init byte. For example, when answering a query, an init byte could use corresponding init transition. Init byte could also use uninit transition, but only when the corresponding init transition was absent. This behaviour was incompatible with DFA union construction. Define an uninit transition to match an uninit byte only and update implementation accordingly. To describe that `Tree::uninit` is valid for any value, build an automaton that accepts any byte value. Additionally, represent byte ranges uniformly as a pair of integers to avoid special case for uninit byte. Fixes rust-lang#140337. Fixes rust-lang#140168 (comment). r? ``@jswrenn`` ``@joshlf``
transmutability: uninit transition matches unit byte only The previous implementation was inconsistent about transitions that apply for an init byte. For example, when answering a query, an init byte could use corresponding init transition. Init byte could also use uninit transition, but only when the corresponding init transition was absent. This behaviour was incompatible with DFA union construction. Define an uninit transition to match an uninit byte only and update implementation accordingly. To describe that `Tree::uninit` is valid for any value, build an automaton that accepts any byte value. Additionally, represent byte ranges uniformly as a pair of integers to avoid special case for uninit byte. Fixes rust-lang#140337. Fixes rust-lang#140168 (comment). r? ```@jswrenn``` ```@joshlf```
cc @jswrenn
The text was updated successfully, but these errors were encountered: