Repository navigation
Immutable
release. Only release title and notes can be modified.
Fixed
- A short Swift name can no longer build a hundred megabytes before it is refused. A
substitution can be repeated two thousand times and each level of nesting multiplies
that, so a 50-character name spelled out to 100 million characters, and took eight
seconds, beforemax_outputwas looked at. The bound now stops the spelling as it is
written. A name may also copy at most four million characters out of its word table,
where 40,000 characters used to ask for 400 MB. - An MSVC name's back-references are counted as they are read. A digit stands for a
whole earlier name or parameter, and the scopes and parameters were only measured one
at a time, so 60,000 characters of?f@AAA...@111...@YAXXZtook three gigabytes to
refuse. It now takes a few megabytes. - An Itanium name's back-references are counted in all.
S_andT_stand for a
type of any size, each type was held tomax_outputby itself, and a parameter list
or an argument list of them was only measured after it had been joined: 12,000
characters took 780 MB to refuse. What a name's back-references stand for is now
capped at sixteen timesmax_output, twice over what any of 394,000 real names needs
relative to its own output. - A Rust v0 name full of back-references to one const is read in linear time. Each
one scanned the const's digits again a character at a time, so 62,000 characters took
nine seconds. It now takes a few hundredths. - Detecting a JNI name no longer goes quadratic on a long one. Every
__was tried
as the signature separator, decoding the whole name each time, before any length
limit applied: 1.2 million characters took a minute. The tries are now rationed by
the name's length. elf_image()andmacho_image()refuse a file whose segments cover it many times
over. Each segment is copied, and a 218 KB ELF with four thousand program headers
that each name the whole file took 1.7 GB. Segments that add up to more than twice
the file are now aMalformedImage.- A control character that only appears once a name is decoded no longer reaches the
output. 0.9.3 refused a name that held one and would spell it. Go's%1b, JNI's
_0001band a Swift punycoded identifier decode to one from clean text, so
go:main.f%1b%5b31mXstill came back with an escape sequence in it. Every spelling is
now checked,demangle_type()'s anddemangle_symbolic()'s included. demangle --strictwrites a name's control characters as escapes in its
complaint. The error already did; the name in front of it was written raw, so a
name could set the terminal's title or clear the screen from standard error.- The cache no longer keeps an entry bigger than it is allowed to be. A name refused
for its length was cached all the same, and one entry could be any size: a 30 MB name
stayed held at 240 MB against a budget of 96. A name overmax_inputis not cached,
and neither is any entry heavier than half the budget. - D names keep the caller's limits.
_Dmainwas answered beforemax_inputand
max_outputwere looked at, andmax_depthnever reached the parser, so
Limits(max_depth=8)read a type nested two hundred deep. A run of type qualifiers
is also joined once: sixty thousand of them took seconds, each wrapping the whole
spelling again.
Install with python -m pip install --upgrade demangle.
See the changelog for details.