Fix aarch64 multi-byte UTF-8 parsing and add symbol imports file

On aarch64, char is unsigned by default, so *buf < 0x20 never held for
bytes >= 0x80, causing strDfa.scan to be skipped for multi-byte UTF-8
sequences in batch mode. Cast to int8_t to get the same signed comparison
used by the SIMD path.

Also add aarch64-symbol-imports.txt with the GLIBC 2.17 versioned symbols
imported by the library on that platform.
This commit is contained in:
2026-06-14 19:42:41 -04:00
parent 12c976a62c
commit 9ea798dba4
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
free@GLIBC_2.17
malloc@GLIBC_2.17
memmove@GLIBC_2.17
+1 -1
View File
@@ -218,7 +218,7 @@ inline PRESERVE_NONE WeaselJsonStatus scan_string_impl(Parser3 *self,
.count_leading_nonzero_lanes();
buf += normal;
if (normal < V::lanes) {
if (buf != bufEnd && *buf < 0x20) {
if (buf != bufEnd && (int8_t)*buf < 0x20) {
buf = (char *)self->strDfa.scan(buf, bufEnd);
}
break;