www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10898] New: LcokingTextWriter segfault in .init state

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

           Summary: LcokingTextWriter segfault in .init state
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dmitry.olsh gmail.com



04:02:21 PDT ---
Test case

import std.stdio;


unittest
{
    static auto useInit(T)(T ltw)
    {
        T val;
        val = ltw;
        return val;
    }
    useInit(stdout.lockingTextWriter());
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 26 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10898


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
            Summary|LcokingTextWriter segfault  |LcokingTextWriter segfaults
                   |in .init state              |in .init state



04:04:20 PDT ---
https://github.com/D-Programming-Language/phobos/pull/1523

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10898




Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/ba9c8fc3bfcde5e64eda7d28427b33dece12ad69
fix locking text writer postblit/dtor

Both should handle T.init correctly
Fix issue 10898

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 29 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10898


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |monarchdodra gmail.com
         Resolution|                            |FIXED



Also fixes postblit from T.init.

unittest
{
    static auto useInit(T)(T ltw)
    {
        T val = T.init;
        val = ltw;
        return val;
    }
    useInit(stdout.lockingTextWriter());
}

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