logoalt Hacker News

pwdisswordfishytoday at 6:44 AM1 replyview on HN

But if the assertion fails, the program is aborted before the pointer would have been dereferenced, making it not UB. This explanation is bogus.


Replies

saagarjhatoday at 8:20 AM

Only if the assert is active. It basically means that the code is invalid when NDEBUG is set.