www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11474] New: REGRESSION(2.064): std.algorithm(1942): Assertion failure

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11474

           Summary: REGRESSION(2.064): std.algorithm(1942): Assertion
                    failure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: thelastmammoth gmail.com


--- Comment #0 from thelastmammoth gmail.com 2013-11-07 14:37:46 PST ---
works on 2.063.2, fails in 2.064
dmd -g -run path/to/bug_2013_11_07_14_04_21.d

core.exception.AssertError std.algorithm(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;
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11474



--- Comment #1 from thelastmammoth gmail.com 2013-11-07 14:41:13 PST ---
note: seems to be only on linux (osx is ok)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11474


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra gmail.com


--- Comment #2 from monarchdodra gmail.com 2013-11-07 15:04:11 PST ---
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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11474


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #3 from monarchdodra gmail.com 2013-11-07 23:20:01 PST ---
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 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2013