[Issue 17564] New: std.experimental.allocator.theAllocator is null within shared static this
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jun 28 05:44:04 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17564
Issue ID: 17564
Summary: std.experimental.allocator.theAllocator is null within
shared static this
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: sludwig at outerproduct.org
vibe.d needs to use "shared static this" for initialization to support the
original initialization scheme for applications that it still in wide use. With
2.075.0-b1, since processAllocator now returns an ISharedAllocator, it had to
switch to theAllocator where possible. However, since this returns null during
the "shared static this" phase, this causes a crash on startup. Setting
theAllocator to something else also doesn't work, because of an assertion in
std.experimental.allocator.
Proposed change is to make initialization lazy, just as for processAllocator.
--
More information about the Digitalmars-d-bugs
mailing list