Thread overview
[Issue 14453] segfault in release mode
Apr 17, 2015
drug007
Jul 29, 2015
Kenji Hara
Jul 29, 2015
Maxim Fomin
Mar 25, 2016
yebblies
Oct 03, 2017
Ellery Newcomer
April 17, 2015
https://issues.dlang.org/show_bug.cgi?id=14453

drug007 <drug2004@bk.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drug2004@bk.ru

--- Comment #1 from drug007 <drug2004@bk.ru> ---
dmd 2.066.1 segfaults too, ldc 2.066.1 and merge-2.067 don't segfault

--
July 29, 2015
https://issues.dlang.org/show_bug.cgi?id=14453

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
           Hardware|x86_64                      |All
                 OS|Linux                       |All
           Severity|enhancement                 |major

--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> ---
I also confirmed it in Win32.
Reduced test case:

void main()
{
    auto c = new C;
    c.insert();
}

class C
{
    this() {}

pure nothrow   // necessary
    new(size_t sz)
    {
        void[] a = new void[](sz);
        return a.ptr;
    }

    void insert() { }
}

--
July 29, 2015
https://issues.dlang.org/show_bug.cgi?id=14453

Maxim Fomin <maxim-fomin@outlook.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim-fomin@outlook.com

--- Comment #3 from Maxim Fomin <maxim-fomin@outlook.com> ---
Isn't new operator depreciated?

--
March 25, 2016
https://issues.dlang.org/show_bug.cgi?id=14453

yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com

--- Comment #4 from yebblies <yebblies@gmail.com> ---
So, the glue layer generates 'ex' which calls the allocator, then calls the ctor on el_same(ex) which decides that since ex has no side effects (being pure and nothrow) it's fine to just duplicate the tree.  So we get:

C.new(8), C.new(8).__ctor

So basically C.new(8) ISN'T pure in a way that matters quite a lot here.

--
October 03, 2017
https://issues.dlang.org/show_bug.cgi?id=14453

Ellery Newcomer <ellery-newcomer@utulsa.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #5 from Ellery Newcomer <ellery-newcomer@utulsa.edu> ---
this is not reproducible in dmd 2.076

--