Arrays of noncopyables/Invalid memory operation

Matt Elkins via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 19 06:15:33 PST 2016


On Thursday, 18 February 2016 at 01:14:00 UTC, ZombineDev wrote:
> https://issues.dlang.org/show_bug.cgi?id=15661. I suggest 
> testing this code again with a newer compiler (see my answer in 
> the other thread - 
> http://forum.dlang.org/post/omfyqfulgyzbrxlzrhvq@forum.dlang.org).

Thanks -- I might get around to that at some point, but for now 
I'm ok waiting for pre-built binaries unless it becomes more of 
an issue (I've diverted far off what I need to be working on 
already).

> The "Invalid memory operation" error is thrown only by the GC 
> (AFAIK) when the user tries something unsupported like 
> allocating or freeing in a destructor, while a GC collection is 
> being run. I think that it's not possible to trigger it in 
> @nogc code.
> From a short debug session, I managed to find out that it 
> crashes on the `++foos.length` line, somewhere inside this 
> function: 
> https://github.com/D-Programming-Language/druntime/blob/e47a00bff935c3f079bb567a6ec97663ba384487/src/rt/lifetime.d#L1265. Unfortunately I currently don't have enough time to investigate further.
> Can you please file a bugzilla issue with this test case?

Done: https://issues.dlang.org/show_bug.cgi?id=15705

Thanks for the help!




More information about the Digitalmars-d-learn mailing list