Bug 18564 – core.demangle exception Range violation
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-06T20:19:03Z
Last change time
2018-03-07T17:27:38Z
Keywords
industry, mangling
Assigned to
No Owner
Creator
johanengelen
Comments
Comment #0 by johanengelen — 2018-03-06T20:19:03Z
Testcase:
```
import core.demangle;
import std.stdio;
void main() {
enum str = "UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUUUUUUUUUUUUUYUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUYUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU";
writeln(demangleType(str));
}
```
Instead of outputting the string, we get:
`core.exception.RangeError@core/demangle.d(230): Range violation`
(found by fuzz testing, but I get a range violation on the same line with a real world type mangle too)