Closed as not planned
Description
A forward from simd-lite/simd-json#264,
I managed to replicate the UB error from miri with this test:
cargo +nightly miri test --features public_imp utf8_validator
I could trigger it with avx2, sse4.2 and avx
#[cfg(all(feature = "public_imp", target_feature = "avx2"))]
#[test]
fn utf8_validator() {
use simdutf8::basic::imp::ChunkedUtf8Validator;
unsafe {
let mut utf8_validator = simdutf8::basic::imp::x86::avx2::ChunkedUtf8ValidatorImp::new();
let tmpbuf = [
49, 46, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
];
utf8_validator.update_from_chunks(&tmpbuf);
assert!(utf8_validator.finalize(None).is_ok());
}
}
Metadata
Metadata
Assignees
Labels
No labels