ddidderr
1422d64300
feat(decompress): move decoder allocation bridges into Rust
Decoder orchestration already crossed into Rust, but the C translation unit
still owned the allocation bridge used by every decoder context and dictionary
set. That split kept custom malloc/calloc/free behavior, allocator-pair
validation, and the decoder-context storage lifecycle in C without focused
Rust coverage.
Move those bridges into Rust while keeping the C-defined `ZSTD_DCtx` layout and
configuration-dependent platform, legacy, and trace leaves in C. Rust now
validates custom allocator pairs, allocates and frees the opaque decoder
storage, dispatches default allocations to libc, and preserves calloc's
zero-fill contract for custom allocators. Focused tests cover default memory,
custom callbacks, zeroing, null-safe free, and invalid callback pairs.
Test Plan:
- `cargo test --manifest-path rust/Cargo.toml --lib -- --test-threads=1` -- 447 passed
- `cargo test --manifest-path rust/Cargo.toml --lib zstd_decompress -- --test-threads=1` -- 6 passed
- `cargo clippy --manifest-path rust/Cargo.toml --lib -- -D warnings` -- passed
- `cargo +nightly fmt --manifest-path rust/Cargo.toml -- --check` -- passed
- `make -B -C lib -j2 lib` -- passed
- `make -B -C tests -j2 test-cli-tests` -- passed
- `ZSTREAM_TESTTIME=-T2s make -B -C tests -j2 test-zstream` -- passed
- `FUZZERTEST=-T5s make -B -C tests -j2 test-fuzzer` -- passed
- `make -B -C tests/fuzz -j2 all` and `sequence_compression_api` -- passed
- `make -C tests -j2 test-zstd` -- passed, including large-data cases
2026-07-18 20:17:16 +02:00
..
2026-07-18 18:04:11 +02:00
2026-07-11 14:26:21 +02:00
2026-07-18 01:47:33 +02:00
2026-07-10 20:44:02 +02:00
2026-07-10 20:02:17 +02:00
2026-07-10 20:02:17 +02:00
2026-07-10 20:02:17 +02:00
2026-07-12 09:16:42 +02:00
2026-07-10 20:02:17 +02:00
2026-07-12 18:06:51 +02:00
2026-07-12 10:13:41 +02:00
2026-07-12 10:40:51 +02:00
2026-07-18 15:58:59 +02:00
2026-07-11 14:23:39 +02:00
2026-07-10 20:04:26 +02:00
2026-07-10 20:02:17 +02:00
2026-07-18 19:34:33 +02:00
2026-07-18 18:44:12 +02:00
2026-07-18 17:54:12 +02:00
2026-07-10 20:44:02 +02:00
2026-07-10 20:04:26 +02:00
2026-07-10 20:06:25 +02:00
2026-07-12 09:13:10 +02:00
2026-07-10 20:48:51 +02:00
2026-07-18 08:08:40 +02:00
2026-07-12 09:16:59 +02:00
2026-07-18 16:14:20 +02:00
2026-07-10 22:38:07 +02:00
2026-07-10 20:05:35 +02:00
2026-07-11 14:25:32 +02:00
2026-07-18 02:52:26 +02:00
2026-07-10 20:02:17 +02:00
2026-07-12 09:59:58 +02:00
2026-07-18 18:56:29 +02:00
2026-07-10 20:02:17 +02:00
2026-07-18 09:26:44 +02:00
2026-07-18 17:59:49 +02:00
2026-07-18 07:33:06 +02:00
2026-07-18 08:52:42 +02:00
2026-07-11 23:11:57 +02:00
2026-07-18 09:00:15 +02:00
2026-07-18 18:43:00 +02:00
2026-07-10 22:44:39 +02:00
2026-07-18 08:28:49 +02:00
2026-07-11 23:11:57 +02:00
2026-07-18 20:16:17 +02:00
2026-07-10 21:20:50 +02:00
2026-07-11 08:07:40 +02:00
2026-07-18 20:17:16 +02:00
2026-07-18 17:13:27 +02:00
2026-07-10 22:46:15 +02:00
2026-07-11 08:06:30 +02:00
2026-07-18 15:39:37 +02:00
2026-07-11 08:22:41 +02:00
2026-07-18 17:13:27 +02:00
2026-07-10 21:28:56 +02:00
2026-07-18 18:00:42 +02:00
2026-07-18 19:00:22 +02:00