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

--- Comment #9 from Stanislav Blinov <stanislav.bli...@gmail.com> ---
It's like we're talking about different things... `malloc` returning null is
*insufficient* to warrant program termination, no matter how you want to call
the wrapper.

As for that:

> They can know by opening std.internal.memory and looking at what 
> `enforceMalloc` does. If they don't know then they should not use it!

No. Just hard no. From your own documentation:

```
Pure variants of C's memory allocation functions `malloc`, `calloc`, and
`realloc` that achieve purity by aborting the program on failure so
they never visibly change errno.
```

null result is not a failure when malloc's argument was 0. So either the
documentation is wrong, or the implementation is wrong.

--

Reply via email to