Repository navigation
Releases: jeffhuen/RustyCSV
Releases · jeffhuen/RustyCSV
Release list
v0.4.6
v0.4.5
RustyCSV 0.4.5 stops bundling a memory allocator by default, which fixes a VM-killing segfault when another NIF in the same BEAM also bundles one.
Fixed
- Fixed a VM-killing segfault when another NIF in the same BEAM also bundles mimalloc. Two statically linked mimalloc copies share a fixed thread-local slot on macOS but keep private page maps, so one copy's
realloccan be handed a block the other allocated, miss its page-map lookup, report a usable size of 0, and copy zero bytes — freeing the original and returning fresh, uninitialised memory. RustyCSV bundled mimalloc by default through 0.4.4 and was one half of the pair behind threebeam.smpcrashes on 2026-08-25; the reproduction was built againstrusty_csv0.4.4. The corruption is symmetric, so the damage lands in whichever library reallocates next, and no validation inside RustyCSV could have detected it — it happens in the allocator, below the library.
Changed
-
mimallocis now an opt-in cargo feature rather than a default, so published artifacts bundle no allocator. Measured on an M1 Pro, the cost is about 22% across a mixed decode/encode workload and is concentrated in the multi-threaded paths:strategy: :parallelencoding is 1.5× slower and 64 KB-chunk streaming 1.34× slower, while single-threaded encoding is unchanged (within 1%) and single-threaded decoding is 3–8% slower (21% forheaders: true). To opt back in, after checking RustyCSV is the only allocator-bundling NIF in your VM:RUSTYCSV_ALLOCATOR=mimalloc FORCE_RUSTYCSV_BUILD=1 mix compile
See allocator safety.
Added
nif_version_2_18cargo feature for OTP 29. Not yet wired intonif_versions— rustler_precompiled 0.9.0 caps supported versions at 2.17, so OTP 29 keeps loading the 2.17 artifact, which is verified to work correctly.- A regression test that fails the build if a default artifact ever links a bundled allocator again.
Documentation
- Added allocator safety: the hazard, how to audit the other NIFs in your VM, the measured performance tradeoff, and what does not fix it.
- Corrected the README and architecture notes, which described mimalloc as the default allocator.
See the full changelog for details.
v0.4.4
v0.4.3
Fix formula-neutralized field encoding Quote and encode each neutralized field as one logical value, validate dump options, and prepare the 0.4.3 metadata and documentation.
v0.4.2
v0.4.1
Remove build-host CPU variants (#6) AVX2 cut isolated scanner time by 35-41% on Zen 3 and Zen 4, but production decode and encode showed no consistent gain outside BEAM benchmark drift. Ship 30 portable artifacts and remove the build-host probes and duplicate wide loops instead of adding runtime unsafe dispatch.
v0.4.0
Complete NimbleCSV 1.3 parity for v0.4.0 (#5) Match NimbleCSV 1.3.0 decoding and encoding behavior, make strict parsing the default with a lenient opt-out, preserve safe redacted errors, and align encoded row shape and BOM handling. Upgrade Rustler to 0.38 and compatible dependencies while retaining NIF 2.15-2.17 support. Add Elixir 1.20 / OTP 29 to the existing compatibility CI matrix. Verified by 489 ExUnit tests, 131 Rust tests, all lint/static-analysis gates, and the NimbleCSV v1.3.0 semantic suite (21/21). No new performance claim is made.
v0.3.11
v0.3.10
Bump version to 0.3.10: Input size guard, strategy docs, pinned rustler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>