Files
tantivy/jitexpr
Paul Masurel 6fc5a7d9b0 Unsafe hardening: fix unsound unsafe sites (#3175)
* Hardening unsafe in substring_count

* Remove unsafe in StrColumn::ord_to_str

ord_to_term may leave arbitrary bytes in the buffer when the term is not
found or on error, which left an invalid UTF-8 String behind.
The buffer is now only put back into the String after UTF-8 validation.
On not found or error, the output is left empty.

* Make CompactDoc::node_data crate private

extract_str relies on string values in node_data being valid UTF-8.
With a public field, safe code could break this invariant.

* Remove unsafe in Term::get_json_path

The public Term API (append_bytes, set_bytes, Term::wrap, serde, ...) can
put arbitrary bytes in the json path. Invalid UTF-8 sequences are now
replaced by U+FFFD.

* LZ4 doc store: never hand back a buffer with uninitialized bytes

compress/decompress now work on a local Vec while it contains
uninitialized bytes, and clear it on error. On error or panic, the
caller's buffer is left empty. Buffer reuse is preserved.
2026-10-13 14:52:34 +02:00
..
2026-09-14 15:08:55 +02:00

This is an expression compiler relying on Cranelift.

UntypedExpr ↓ injecting variable types, and type checking TypedExpr ↓ lowering Cranelift IR ↓ Cranelift code generation Machine code (or assembly)

The project does not rely on cranelifts function call abstraction. Instead it just manipulates expression, so everything is always inlined.