Commit 28d5f8f
utf8: address Copilot review comments on PR #677
- pack_utf8_span (utf8_ext.pyx): validate rel is well-formed (rel[0]==0,
non-decreasing, within data's bounds) before the unchecked C loop,
instead of trusting the caller silently -- a malformed rel previously
risked an out-of-bounds read/crash.
- Utf8Factorizer docstring: stop claiming a hash collision's duplicate
vocabulary entry is "benign because callers merge groups by decoded
value" -- no downstream consumer does that merge, so a collision would
actually split a group in two. Still an accepted, vanishingly-rare
risk with 64-bit hashes, just not a resolved one.
- test_utf8.py: two groupby tests assigned float64 values into the
int64 `x` column via implicit cast; use integer inputs explicitly so
the test doesn't rely on that coercion.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 22aafbf commit 28d5f8f
3 files changed
Lines changed: 42 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
676 | 680 | | |
677 | 681 | | |
678 | 682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
262 | 284 | | |
263 | 285 | | |
264 | 286 | | |
| |||
874 | 896 | | |
875 | 897 | | |
876 | 898 | | |
877 | | - | |
| 899 | + | |
878 | 900 | | |
879 | 901 | | |
880 | 902 | | |
| |||
927 | 949 | | |
928 | 950 | | |
929 | 951 | | |
930 | | - | |
| 952 | + | |
931 | 953 | | |
932 | 954 | | |
933 | | - | |
| 955 | + | |
934 | 956 | | |
935 | 957 | | |
936 | 958 | | |
| |||
0 commit comments