You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dcb4f50
Browse filesBrowse the repository at this point in the historyBrowse files
## Summary
Fixes#10623.
`Dict::fill_null` converted the index of the matching dictionary value
into the codes type with an unchecked `as` cast. A dictionary can hold
more values than its codes type can index, so an unreferenced fill value
could truncate to the wrong code (with `u8` codes, filling with value
300 returned value 44) or panic for signed codes.
## Changes
The kernel now checks the index against the range of the codes type.
When the index does not fit, the kernel declines and the generic
`fill_null` path fills the decoded array, which is slower but correct.
Non-nullable codes need no fill code, so they keep the fast path. The
new tests cover `u8` and `i8` codes at and past their maximum, and
non-nullable codes over nullable values. The three cases past the
maximum fail without the fix.
The `Narrow` work (#10733) depends on this fix, because a rule there
makes narrow dictionary codes common.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Signed-off-by: Connor Tsui <[email protected]>
0 commit comments