www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22779] New: druntime: Calling __delete with null

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

          Issue ID: 22779
           Summary: druntime: Calling __delete with null pointer-to-struct
                    segfaults
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

---
import core.memory;
A *aptr;
__delete(aptr);
---

This differs from both the documentation of __delete and the old delete
behaviour which is to return with no effect.

--
Feb 16 2022