[Issue 5064] New: Crash related to std.algorithm.map, delegates, and casts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 16 13:30:30 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5064

           Summary: Crash related to std.algorithm.map, delegates, and
                    casts
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at klickverbot.at


--- Comment #0 from klickverbot <code at klickverbot.at> 2010-10-16 13:29:55 PDT ---
The following program crashes using DMD 2.049 on Linux x86_64 and DMD 2.048 on
OS X x86_64:

---
import std.algorithm;

void main() {
   foreach ( offset; 0 .. 26 ) {
      map!( ( c ){ return cast( dchar )offset; } )( "asdf" );
   }
}
---

If you remove the cast to dchar, the segmentation fault does no longer occur.

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


More information about the Digitalmars-d-bugs mailing list