[asterisk-dev] policy change for correct handling of fatal program conditions

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Jan 22 18:17:36 MST 2007


On Monday 22 January 2007 16:10, SF Markus Elfring wrote:
> The bug report "add checks for calloc calls"
> (http://bugs.digium.com/view.php?id=8295) results in a opportunity to
> think again about the used approaches for error handling. Your
> current policy seems to be wrong.
> Fatal program conditions like the one that arose from a failed memory
> allocation should not be ignored. How do you think about a correction
> for this issue?

We're not suggesting that you ignore the condition, only that you do not
completely abort the Asterisk process.  You may abort the current call,
which should free memory for other calls.  You may also log the
exceptional condition, for the benefit of the administrator.

A failure of memory allocation for a single call should not affect
processing for any of the other calls in progress on the system.

-- 
Tilghman


More information about the asterisk-dev mailing list