[$] GMP and assert()

Post Syndicated from jake original https://lwn.net/Articles/780817/rss

A report of a potential security problem in the GNU Multiple Precision Arithmetic (GMP)
was met with a mixed reaction, from
skepticism to responses verging on hostility, but the report ultimately
raised a question worth pondering. What role should assertions
(i.e. calls to the POSIX assert()
play in error handling? An
assertion that fails leads to a process exit, which may not be what a
developer calling into a library expects. Unexpected behavior is, of
course, one step on a path that can lead to security holes.