D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15821 - std.container.array.Array on the heap leads to InvalidMemoryOperationError
Summary: std.container.array.Array on the heap leads to InvalidMemoryOperationError
Status: RESOLVED DUPLICATE of issue 15822
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-22 15:55 UTC by ag0aep6g
Modified: 2016-03-23 08:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ag0aep6g 2016-03-22 15:55:18 UTC
Found by stunaep who posted to D.learn:
http://forum.dlang.org/post/tbaooqjjjsvgnlchjadc@forum.dlang.org

Following code works with 2.070.2, but with git head dmd (ec7c6a9) it throws "core.exception.InvalidMemoryOperationError@src/core/exception.d(693): Invalid memory operation".

----
import std.container.array: Array;
void main()
{
    new Array!int([1]);
}
----
Comment 1 ag0aep6g 2016-03-22 15:59:08 UTC
Issue 15809 looks very similar. This suggests that there's a dmd/druntime bug beneath.
Comment 2 Martin Nowak 2016-03-23 08:32:31 UTC
Why are people on D.learn using the development version of the compiler?

*** This issue has been marked as a duplicate of issue 15822 ***