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)
Comment #1 by r.sagitario — 2018-03-06T22:51:21Z
Did you try latest dmd master? There have been a couple of recent fixes that look similar, e.g. https://issues.dlang.org/show_bug.cgi?id=18300 and https://issues.dlang.org/show_bug.cgi?id=18208.
Comment #2 by johanengelen — 2018-03-07T17:27:38Z
Indeed Rainer, this is fixed in master. *** This issue has been marked as a duplicate of issue 18300 ***