[OT] OT: Null checks.

Timon Gehr timon.gehr at gmx.ch
Tue May 6 15:34:42 UTC 2025


On 5/6/25 09:48, Walter Bright wrote:
> I don't understand your comment. The assert can be changed to whatever 
> you want by setting the assert handler.

- There are `assert(0)` in druntime.
- Druntime/Phobos ship as `-release` build.

Therefore, setting the assert handler will do nothing, even if you 
configure checkaction to call it in your own project.


Kagamin is saying:

- The implementation of checkaction itself is where you added the 
`assert(0)`. (!)

I.e., even if you configure your project not to hard-crash, the function 
that is supposed to implement the soft crash will itself hard-crash.

- DMD does not call this function by default.

But LDC does. So you get invalid instruction errors in LDC debug builds.


More information about the Digitalmars-d mailing list