Bug 10898 – LockingTextWriter segfaults in .init state

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-26T04:02:00Z
Last change time
2013-08-30T07:12:27Z
Keywords
pull
Assigned to
nobody
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2013-08-26T04:02:21Z
Test case import std.stdio; unittest { static auto useInit(T)(T ltw) { T val; val = ltw; return val; } useInit(stdout.lockingTextWriter()); }
Comment #1 by dmitry.olsh — 2013-08-26T04:04:20Z
Comment #2 by github-bugzilla — 2013-08-29T00:02:53Z
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
Comment #3 by monarchdodra — 2013-08-30T07:12:27Z
Also fixes postblit from T.init. unittest { static auto useInit(T)(T ltw) { T val = T.init; val = ltw; return val; } useInit(stdout.lockingTextWriter()); }