Closed WebFreak001 closed 4 years ago
./dcd-client -s foo < /dev/null
will trigger (on ~master, works fine on 0.12.0)
core.exception.AssertError@../../.dub/packages/libdparse-0.13.2/libdparse/src/dparse/lexer.d(2319): Assertion failure ---------------- ??:? _d_assertp [0x5558133a0d85] ??:? pure nothrow ref @nogc @trusted dparse.lexer.StringCache dparse.lexer.StringCache.__ctor(ulong) [0x55581335231a] ??:? dcd.common.messages.AutocompleteResponse dcd.server.autocomplete.symbols.symbolSearch(const(dcd.common.messages.AutocompleteRequest), ref dsymbol.modulecache.ModuleCache) [0x55581324e939] ??:? int dcd.server.main.runServer(immutable(char)[][]) [0x5558132606f2] ??:? _Dmain [0x55581325f993]
because it tries to create a StringCache with size 0, because optimalBucketCount returns 0 if 0 is passed in as length, which triggers an assert on StringCache.
optimalBucketCount
0
will trigger (on ~master, works fine on 0.12.0)
because it tries to create a StringCache with size 0, because
optimalBucketCount
returns0
if0
is passed in as length, which triggers an assert on StringCache.