forked from weaselab/weaseljson
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:
@@ -0,0 +1,3 @@
|
||||
free@GLIBC_2.17
|
||||
malloc@GLIBC_2.17
|
||||
memmove@GLIBC_2.17
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user