core: Introduce chaos into memory allocations

Locate potential crashes by exercising seldom
used code paths.  This patch introduces a new
define DEBUG_CHAOS, and mechanism to randomly
return an error condition from functions that
will seldom do so.  Functions that handle the
allocation of memory get the first treatment.

Review: https://reviewboard.asterisk.org/r/4463/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Scott Griepentrog
2015-03-17 21:57:26 +00:00
parent 2122c205e6
commit 1fb1c81923
2 changed files with 42 additions and 0 deletions

View File

@@ -79,6 +79,10 @@
<member name="MALLOC_DEBUG" displayname="Keep Track of Memory Allocations">
<support_level>core</support_level>
</member>
<member name="DEBUG_CHAOS" displayname="Randomly FAIL memory allocations or other operations">
<conflict>MALLOC_DEBUG</conflict>
<support_level>core</support_level>
</member>
<member name="BUSYDETECT_TONEONLY" displayname="Enable additional comparision of only the tone duration not the silence part">
<conflict>BUSYDETECT_COMPARE_TONE_AND_SILENCE</conflict>
<defaultenabled>no</defaultenabled>