Fix soudness issues in jemalloc bindings #2565

Merged
Jade merged 22 commits from jade/jemalloc-issues into main 2026-11-21 15:34:24 +00:00
Owner

Fix a whole bunch of soundness issues and potential bugs in jemalloc integration code

Fix a whole bunch of soundness issues and potential bugs in jemalloc integration code
Jade added 11 commits 2026-11-21 01:56:36 +00:00
Lines 325-327
@ -223,0 +317,6 @@
/// # Safety
/// Caller must ensure `key` is an `arena.<i>.*` notification MIB
/// (`key.len() >= 2`).
// `arena_id()` returns this thread's own valid arena (< narenas < ARENA_LIMIT),
// so we skip `validate_arena_id()` to avoid locking `ctl_mtx` on hot paths like
// `decay()`.
Owner

Is this intentionally a comment here instead of a docstring?

Is this intentionally a comment here instead of a docstring?
Author
Owner

Nope, oops

Nope, oops
Jade marked this conversation as resolved
nex approved these changes 2026-11-21 02:15:39 +00:00
nex left a comment

lgtm

lgtm
Lines 524-528
@ -335,0 +521,8 @@
}
}
/// # Safety
/// Caller must ensure `T` matches the exact C type expected by `key`.
// Does not advance `epoch`; callers reading cached `stats.*` must call
// `inc_epoch()` explicitly.
unsafe fn set<T>(key: &Key, val: T) -> Result<T>
Owner

I think this comment is meant to be part of the docstring too

I think this comment is meant to be part of the docstring too
Jade marked this conversation as resolved
docs(alloc): Fix interrupted doc comments in je.rs
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Checks / Prek / Check changed files (pull_request) Successful in 9s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m14s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m32s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m4s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 6m48s
cf8d6091f1
Jade force-pushed jade/jemalloc-issues from cf8d6091f1
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Checks / Prek / Check changed files (pull_request) Successful in 9s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m14s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m32s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m4s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 6m48s
to 94f5026d57
All checks were successful
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m25s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m35s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m53s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m17s
2026-11-21 13:37:25 +00:00
Compare
Jade changed title from jade/jemalloc-issues to Fix soudness issues in jemalloc bindings 2026-11-21 13:41:39 +00:00
refactor: Unify memory stats and create feature parity
Some checks failed
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 8s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m27s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m37s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m8s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 10m36s
5bb55a1285
fix: Use mimalloc for c/c++ code by default
Some checks failed
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 59s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m36s
Update flake hashes / update-flake-hashes (pull_request) Successful in 2m18s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m19s
8e54ea0853
chore: Add newsfrag
All checks were successful
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m12s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m25s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m24s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m57s
Checks / Prek / Check changed files (pull_request) Successful in 6s
08098c5e88
Jade force-pushed jade/jemalloc-issues from 08098c5e88
All checks were successful
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m12s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m25s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m24s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m57s
Checks / Prek / Check changed files (pull_request) Successful in 6s
to cb9b3e65d0
Some checks failed
Checks / Prek / Check changed files (pull_request) Successful in 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m12s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m58s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m11s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 32s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 11m1s
Checks / Prek / Check changed files (push) Successful in 6s
Documentation / Build and Deploy Documentation (push) Successful in 1m31s
Checks / Prek / Pre-commit & Formatting (push) Successful in 2m12s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 9m16s
Release Docker Image / Build linux-amd64 (release) (push) Has been cancelled
Release Docker Image / Build linux-arm64 (release) (push) Has been cancelled
Release Docker Image / Create Multi-arch Release Manifest (push) Has been cancelled
Release Docker Image / Build linux-amd64 (max-perf) (push) Has been cancelled
Release Docker Image / Build linux-arm64 (max-perf) (push) Has been cancelled
Release Docker Image / Create Max-Perf Manifest (push) Has been cancelled
Release Docker Image / Release Binaries (push) Has been cancelled
Release Docker Image / Mirror Images (push) Has been cancelled
2026-11-21 15:22:05 +00:00
Compare
Jade scheduled this pull request to auto merge when all checks succeed 2026-11-21 15:22:17 +00:00
Jade merged commit cb9b3e65d0 into main 2026-11-21 15:34:24 +00:00
Sign in to join this conversation.
No reviewers
nex
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity!2565
No description provided.