Skip to content
Commit 3763d3b5 authored by Jason Evans's avatar Jason Evans
Browse files

Refactor arena_cactive_update() into arena_cactive_{add,sub}().

This removes an implicit conversion from size_t to ssize_t.  For cactive
decreases, the size_t value was intentionally underflowed to generate
"negative" values (actually positive values above the positive range of
ssize_t), and the conversion to ssize_t was undefined according to C
language semantics.

This regression was perpetuated by
1522937e (Fix the cactive statistic.)
and first release in 4.0.0, which in retrospect only fixed one of two
problems introduced by aa5113b1
(Refactor overly large/complex functions) and first released in 3.5.0.
parent a62e94ca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment