[Issue 18208] ddemangle RangeError at src/core/demangle.d(230)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 27 06:03:09 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18208

--- Comment #2 from Timothee Cour <timothee.cour2 at gmail.com> ---
further reduced:


```
  auto
mangled="_D4vibe4data4bson14BsonSerializer__T18endWriteArrayEntryTSQCeQCc13serialization__T9SubTraitsTSQDoQDmQBk__T6TraitsTAfSQElQEjQCh13DefaultPolicyVS6dproto10attributes6PackedS0VSQBeQBa10ProtoFieldS2a5_666c6f6174i6ZQDzTfZQFdZQHbMFNaNbNiNfmZv";
  import core.demangle;
  auto dst=new char[50];
  auto ret=demangle(mangled, dst);
  import std.stdio;
  writeln(ret);

```

```
core.exception.RangeError at core/demangle.d(230): Range violation
----------------
0   lldbdplugin                         0x000000010bbd1839
object.Throwable.TraceInfo core.runtime.defaultTraceHandler(void*) + 137
1   lldbdplugin                         0x000000010bbeaf7a _d_createTrace + 58
2   lldbdplugin                         0x000000010bbebb74 _d_throw_exception +
132
3   lldbdplugin                         0x000000010bbcf71e onRangeError + 158
4   lldbdplugin                         0x000000010bbd01e7 _d_arraybounds + 7
5   lldbdplugin                         0x000000010bbc947b pure @safe char[]
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.append(const(char)[]) +
251
6   lldbdplugin                         0x000000010bbca270 pure @safe void
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseLName() + 400
7   lldbdplugin                         0x000000010bbca30f pure @safe void
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseLName() + 559
8   lldbdplugin                         0x000000010bbcb324 pure @safe char[]
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseQualifiedName() +
68
9   lldbdplugin                         0x000000010bbca482 pure @safe char[]
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseType(char[]) + 114
10  lldbdplugin                         0x000000010bbcc8dd pure @safe void
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseTemplateArgs() +
141
11  lldbdplugin                         0x000000010bbcd073 pure @safe void
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseTemplateInstanceName(bool)
+ 323
12  lldbdplugin                         0x000000010bbccea7 pure @safe void
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseMangledName(bool,
ulong) + 487
13  lldbdplugin                         0x000000010bbcd4c2 pure nothrow @safe
char[]
core.demangle.Demangle!(core.demangle.NoHooks).Demangle.doDemangle!(core.demangle.Demangle!(core.demangle.NoHooks).Demangle.parseMangledName).doDemangle()
+ 130
14  lldbdplugin                         0x000000010bbc2774 pure nothrow @safe
char[] core.demangle.demangle(const(char)[], char[]) + 84
15  lldbdplugin                         0x000000010ba9ed3e void
dtools.lldbdplugin.__unittest__Users_timothee_git_clone__timotheecour__dtools_dtools_lldbdplugin_d_115_1()
+ 78
16  lldbdplugin                         0x000000010ba9ffda
dtools.lldbdplugin.__unittest + 10
17  lldbdplugin                         0x000000010bbd1ff7 int
core.runtime.runModuleUnitTests().__foreachbody2(object.ModuleInfo*) + 23
18  lldbdplugin                         0x000000010bbf3fa1 int
rt.minfo.moduleinfos_apply(scope int
delegate(immutable(object.ModuleInfo*))).__foreachbody2(ref
rt.sections_elf_shared.DSO) + 49
19  lldbdplugin                         0x000000010bbf4ac9 int
rt.sections_elf_shared.DSO.opApply(scope int delegate(ref
rt.sections_elf_shared.DSO)) + 57
20  lldbdplugin                         0x000000010bbf3f4b int
rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*))) +
27
21  lldbdplugin                         0x000000010bbe529e int
object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)) + 30
22  lldbdplugin                         0x000000010bbd1ee2 runModuleUnitTests +
130
23  lldbdplugin                         0x000000010bbeb4ea _d_run_main + 442
24  lldbdplugin                         0x000000010ba9e654 main + 36

```

--


More information about the Digitalmars-d-bugs mailing list