Bug 10891 – regression(2.063.2 => v2.064-devel-a3e447c): Error: function std.uni.TrieBuilder
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-25T14:36:00Z
Last change time
2013-08-27T19:05:04Z
Assigned to
nobody
Creator
thelastmammoth
Comments
Comment #0 by thelastmammoth — 2013-08-25T14:36:23Z
dmd_from_gitmaster -c -inline -release -noboundscheck -Ipath/to/Dscanner/ main.d
phobos/std/uni.d(3547): Error: function std.uni.TrieBuilder!(ubyte, dchar, 1114112, sliceBits!(13LU, 21LU), sliceBits!(6LU, 13LU), sliceBits!(0LU, 6LU)).TrieBuilder.putAt errors compiling the function
if you use dmd (2.063.2) instead of dmd_from_gitmaster, it works.
if you remove any of the flags -inline -release -noboundscheck, it works.
----
import stdx.d.lexer;
void main() {
LexerConfig config;
auto a=(ubyte[]).init.byToken(config);
}
----
Comment #1 by andrej.mitrovich — 2013-08-25T16:07:28Z
Confirmed, with:
dscanner - 42cf96c6d24bb21ad076ac81d37211f2c389057a
dmd - 1399b1f7b94ef1c1b24f2ce842b6f247e2e1fc52
phobos - 153034ccf843cc00052ede6febc79a3d26bd1dff
Also, DMD crashes after the error. Stack trace:
0018f9c0 004e7dbd image00400000!FuncDeclaration::toObjFile+0x4a [C:\dmd-git\dmd2\src\dmd\src\glue.c @ 553]
0018f9ec 004e86ea image00400000!StructDeclaration::toObjFile+0x14e [C:\dmd-git\dmd2\src\dmd\src\toobj.c @ 988]
0018fa14 004e099c image00400000!TemplateInstance::toObjFile+0x9b [C:\dmd-git\dmd2\src\dmd\src\toobj.c @ 1329]
0018fac4 00405823 image00400000!Module::genobjfile+0x28a [C:\dmd-git\dmd2\src\dmd\src\glue.c @ 360]
0018ff0c 00405a53 image00400000!tryMain+0x32c5 [C:\dmd-git\dmd2\src\dmd\src\mars.c @ 1662]
0018ff48 0057aced image00400000!main+0x43 [C:\dmd-git\dmd2\src\dmd\src\mars.c @ 1724]
windbg highlights this line (the if line):
// If errors occurred compiling it, such as bugzilla 6118
if (type && type->ty == Tfunction && ((TypeFunction *)type)->next->ty == Terror)
return;
I'm assuming 'next' is probably null at this point (can't verify this yet, maybe later).
Comment #2 by k.hara.pg — 2013-08-27T18:51:59Z
(In reply to comment #0)
> phobos/std/uni.d(3547): Error: function std.uni.TrieBuilder!(ubyte, dchar,
> 1114112, sliceBits!(13LU, 21LU), sliceBits!(6LU, 13LU), sliceBits!(0LU,
> 6LU)).TrieBuilder.putAt errors compiling the function
(In reply to comment #1)
> windbg highlights this line (the if line):
>
> // If errors occurred compiling it, such as bugzilla 6118
> if (type && type->ty == Tfunction && ((TypeFunction *)type)->next->ty ==
> Terror)
> return;
>
> I'm assuming 'next' is probably null at this point (can't verify this yet,
> maybe later).
I think this would be a dup of bug 10836, and it was recently fixed.
Could you confirm this bug again with git-head?
Comment #3 by andrej.mitrovich — 2013-08-27T19:05:04Z
(In reply to comment #2)
> I think this would be a dup of bug 10836, and it was recently fixed.
> Could you confirm this bug again with git-head?
Confirmed, commit 01d22e4f3b2a6c07dabc0307eb4ee6b066ae27dd fixes it, previous commit had the issue.
*** This issue has been marked as a duplicate of issue 10836 ***