test(compress): cover Rust local dictionary assignment
The local-dictionary callback is now a C adapter around Rust-owned assignment policy. Add a small allocator probe and focused tests for by-reference loading, by-copy data publication, static-CCtx rejection, and allocation failure. The probe observes the output slots during allocation so the test also protects the original allocation-before-publication ordering. Strengthen the C and Rust repr(C) checks with an explicit custom-allocator function-pointer size check. The capped C-integrated build and original test suite remain deferred to the main worker, which must run them serially under the repository's 40 GiB virtual memory limit. Test Plan: - `git diff --cached --check` -- passed. - `rustfmt --check rust/src/zstd_compress_dictionary.rs` -- passed. - Capped cargo, make, native, fuzzer, and full-suite verification -- not run by design; deferred to the main worker.
This commit is contained in:
@@ -2914,6 +2914,7 @@ typedef char ZSTD_rust_assign_local_dict_state_layout[
|
||||
&& offsetof(ZSTD_rust_assignLocalDictState, dictBuffer) == 3 * sizeof(void*)
|
||||
&& offsetof(ZSTD_rust_assignLocalDictState, dictSize) == 4 * sizeof(void*)
|
||||
&& offsetof(ZSTD_rust_assignLocalDictState, dictContentType) == 5 * sizeof(void*)
|
||||
&& sizeof(ZSTD_rust_assignLocalDictAllocate_f) == sizeof(void*)
|
||||
&& offsetof(ZSTD_rust_assignLocalDictState, allocate) == 6 * sizeof(void*)
|
||||
&& sizeof(ZSTD_rust_assignLocalDictState) == 7 * sizeof(void*)) ? 1 : -1];
|
||||
size_t ZSTD_rust_assignLocalDict(
|
||||
|
||||
Reference in New Issue
Block a user