Re:Quantitative analysis of issues found by afl in mandoc
by RickHull on Saturday June 20, 2015 @03:04AM
(#9749260)
Furthermore, assert is specifically intended to catch internal logic bugs which would still be present even after user input validation. i.e. logic bugs which are invariant upon user input
assert() is usually used in debug builds to verify internal invariants of the code: "if this is false, something has gone horribly, terribly wrong; we've gone crazy and we should abort to avoid further hurting ourselves or others". It shouldn't be used to verify that user input is well-formed, since this happens under normal circumstances.