Revision history for Struct::Codec
0.05 2026-09-18
- FIXES a heap corruption decoding a hash key of length zero that
carries the UTF-8 flag.
- t/25-wide-nv.t used perl's numifier to build -1.797...e+308, which
overflows to -Inf below 5.30, and an infinity compares against
nothing. The exponent is divided out and the mantissa named.
- t/14-corrupt.t asserted two refusals that only a 64-bit UV gives:
an eleven-byte varint is refused for its width, not its length,
where a UV is 32 bits, and the descriptor fixture is now a value
past INT_MAX that still fits one.
0.04 2026-09-18
- A float on a perl built -Dusequadmath kept one significant digit: a
third came back 0.3, and on a 32-bit one perl died "panic:
my_snprintf buffer overflow". The precision was passed as "%.*",
which my_snprintf never hands to quadmath_snprintf. It is written
into the format now, as perl's own sv.c does.
- A float on a perl built -Duselongdouble below 5.30 came back a ULP
or two out: the digits were read with Atof, which is perl's own
numifier and was not correctly rounded until 5.30 (perl RT #41202).
The decoder names strtold, strtoflt128 or strtod for the build.
- Those digits now use '.' for a radix whatever the locale is.
- t/25-wide-nv.t asserts the digit count on the bytes, and no longer
uses perl's numifier as an oracle on a perl whose numifier is the
thing at fault.
0.03 2026-09-17
- FIXES a heap corruption when encoding an anonymous sub. The
deparser is loaded with load_module, which runs perl and can
reallocate the argument stack; the stack pointer taken before it
was then stale, and pushing the deparse arguments through it wrote
to freed memory. It surfaced only when the load triggered a
realloc, so it depended on how deep the stack already was: a bare
encode was usually fine and a sub encoded from inside a larger
program crashed at destruction. SPAGAIN after the load. Seen as a
SIGABRT/SIGSEGV in t/32-kinds.t on threaded 5.18.
- t/16-leak.t built its probe list with a regexp unconditionally,
which the codec refuses below 5.12, so the file died there on
5.10. The regexp joins the list only where it can be encoded, as
t/32 already skips it.
- A float on a perl built -Duselongdouble or -Dusequadmath kept only
what a double holds. Such a value now goes out as decimal digits
under tag 0x38, and comes back the number it was. A perl whose NV
is a double writes the same bytes as before.
- t/25-wide-nv.t.
0.01 2026-09-12
- First version.
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
Go to GitHub issues (only if GitHub is preferred repository)