Using emplace leading to memory corruption

monarch_dodra monarchdodra at gmail.com
Sun Sep 29 01:21:33 PDT 2013


On Sunday, 29 September 2013 at 07:03:30 UTC, d coder wrote:
> Greetings
>
> I am trying to use emplace and it is seemingly leading to memory
> corruption. Before I file a bug on DMD Buzilla, I want to find 
> out if I am
> doing something wrong or if it is a known issue. I am using a 
> linux box and
> this testcase is freaky -- if I comment out either line 20 or 
> line 24, the
> segfault vanishes.
>
> Thanks
> - Puneet

I didn't see anything obviously wrong with your code.

Remember though that when emplacing a class over some memory, you 
must account for any extra alignment (though that doesn't seem to 
be a problem here).

Any chance you could simplify this and file it?


More information about the Digitalmars-d mailing list