Bug 11474 – REGRESSION(2.064): std.algorithm(1942): Assertion failure

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-07T14:37:00Z
Last change time
2013-11-07T23:20:01Z
Assigned to
nobody
Creator
thelastmammoth

Comments

Comment #0 by thelastmammoth — 2013-11-07T14:37:46Z
works on 2.063.2, fails in 2.064 dmd -g -run path/to/bug_2013_11_07_14_04_21.d [email protected](1942): Assertion failure ---------------- bug_2013_11_07_14_04_21(_d_assertm+0x26) [0x46519e] bug_2013_11_07_14_04_21() [0x46a522] bug_2013_11_07_14_04_21(pure nothrow @trusted void std.algorithm.swap!(std.typecons.Tuple!(immutable(char)[]).Tuple).swap(ref std.typecons.Tuple!(immutable(char)[]).Tuple, ref std.typecons.Tuple!(immutable(char)[]).Tuple)+0x6b) [0x461347] bug_2013_11_07_14_04_21(pure nothrow @safe void std.typecons.Tuple!(immutable(char)[]).Tuple.opAssign!(std.typecons.Tuple!(immutable(char)[]).Tuple).opAssign(std.typecons.Tuple!(immutable(char)[]).Tuple)+0x55) [0x460739] bug_2013_11_07_14_04_21(pure nothrow @safe void std.array.Appender!(std.typecons.Tuple!(immutable(char)[]).Tuple[]).Appender.put!(std.typecons.Tuple!(immutable(char)[]).Tuple).put(std.typecons.Tuple!(immutable(char)[]).Tuple)+0xd6) [0x4611ea] bug_2013_11_07_14_04_21(_D3std5array262__T5arrayTSmain233__T9MapResultS14main9__lambda3TSmain183__T9MapResultS14main9__lambda2TS3std9algorithm65__T6joinerTSmain36__T9MapResultS14main9__lambda1TAAyaZ9MapResultZ6joinerFSmain36__T9MapResultS14main9__lambda1TAAyaZ9MapResultZ6ResultZ9MapResultZ9MapResultZ5arrayFSmain233__T9MapResultS14main9__lambda3TSmain183__T9MapResultS14main9__lambda2TS3std9algorithm65__T6joinerTSmain36__T9MapResultS14main9__lambda1TAAyaZ9MapResultZ6joinerFSmain36__T9MapResultS14main9__lambda1TAAyaZ9MapResultZ6ResultZ9MapResultZ9MapResultZAS3std8typecons14__T5TupleTAyaZ5Tuple+0x50) [0x46084c] ----------- import std.stdio; import std.file; import std.algorithm; import std.typecons; import std.range; import std.path; void main(){ string dir=__FILE__.dirName; auto dirs=[dir]; auto pattern=__FILE__.baseName; auto files=dirs.map!(dir=>dirEntries(dir,pattern,SpanMode.breadth,false)).joiner.map!(a=>a.name); auto lines2=files.map!(a=>tuple(a)).array; }
Comment #1 by thelastmammoth — 2013-11-07T14:41:13Z
note: seems to be only on linux (osx is ok)
Comment #2 by monarchdodra — 2013-11-07T15:04:11Z
This seems fixed already in Head, probably my Appender/emplace fix (though I thought walter merged it for 2.064? I need to check). The question though is what caused it to break in 2.064? AFAIK, none of the changes I made could trigger this. Maybe a bad merge? I'll investigate a bit.
Comment #3 by monarchdodra — 2013-11-07T23:20:01Z
Right, this a a complete duplicate of: http://d.puremagic.com/issues/show_bug.cgi?id=10690 http://d.puremagic.com/issues/show_bug.cgi?id=10859 2.064a introduced an improvement to Tuple that "revealed" a preexisting issue, that we did not have time to fix for 2.064. This *just* got fixed in head, but apparently, wasn't back-merged into 2.064. *** This issue has been marked as a duplicate of issue 10690 ***