RFC: Change what assert does on error

Dennis dkorpel at gmail.com
Fri Jul 4 22:11:20 UTC 2025


On Friday, 4 July 2025 at 20:49:56 UTC, Timon Gehr wrote:
> Skipping destructors may leave the program in an inconsistent 
> and unpredictable state, including memory corruption due to 
> lack of cleanup of stack pointers.

I'm sorry but I have to ask this question a third time now: What 
are you doing in your destructors that affects your error 
handler's output? How does *not* cleaning up result in memory 
corruption, instead of just an irrelevant memory leak? From my 
perspective calling free() after the program entered an invalid 
state is still more risky than not calling it. I feel like I'm 
missing something about your program because this:

> It writes a file with the full interaction log that leads to 
> the crash

Doesn't sound like something that would fail when cleanup is 
skipped.



More information about the Digitalmars-d mailing list