[Issue 9798] The memory assigned in multithread is broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 23 13:38:57 PDT 2013


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


Masahiro Nakagawa <repeatedly at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |repeatedly at gmail.com
         Resolution|                            |INVALID


--- Comment #1 from Masahiro Nakagawa <repeatedly at gmail.com> 2013-03-23 13:38:56 PDT ---
This is not dmd bug.

> return receiveExact((cast(ubyte*)dat.ptr)[0..len*T.sizeof]);

and

> && sock.send((cast(const ubyte*)dat.ptr)[0..len * T.sizeof]) != Socket.ERROR;

have the bug.

You should use "(ForeachType!T).sizeof" instead of "T.sizeof".
Because "T.sizeof" is dynamic array object size, not array element size.

-- 
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