Commit Graph

26 Commits

Author SHA1 Message Date
Sean Bright
fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Corey Farrell
478fb4a388 MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC.
There are 3 ways that calls directly to standard allocator functions can
be dealt with:
1. Block their use, cause them to generate an error.  This is the default.
2. Replace them with the Asterisk equivalent function calls.
3. Leave them alone.

This change allows one of these 3 options to be selected by any source.
The source just needs to define ASTMM_LIBC to ASTMM_BLOCK, ASTMM_REDIRECT,
or ASTMM_IGNORE to use option 1, 2 or 3 respectively.  Normally ASTMM_BLOCK
is the correct option, so it is default when ASTMM_LIBC is not defined.
In some cases when building 3rd party code it is desirable to have it use
Asterisk functions, without changing the whole source - ASTMM_REDIRECT
accomplishes this.  When using 3rd party libraries sometimes a static
inline function will make use of malloc or free.  In these cases it may
be unsafe to replace the allocator in the header, as it's possible the
memory could be freed by the library using standard allocators.  For
those cases ASTMM_IGNORE is needed.

Change-Id: I8afef4bc7f3b93914263ae27d3a5858b69663fc7
2015-05-13 21:55:07 -04:00
Corey Farrell
f93b3a22d6 Fix crash in codec_lpc10 when MALLOC_DEBUG is enabled.
This switches codecs/lpc10/lpcini.c back to including "asterisk.h"
instead of <stdlib.h>.  lpcini.c allocates memory that is freed by
codec_lpc10.c, so it is important to use MALLOC_DEBUG allocator.
Added #define WRAP_LIBC_MALLOC to the start of the source to prevent
runtime symbol link error's.

Change-Id: I74f63fd09fdeb673ee7753122c3bb4722ab6e1ac
2015-05-08 13:29:50 -04:00
Corey Farrell
a8bfa9e104 Modules: Make ast_module_info->self available to auxiliary sources.
ast_module_info->self is often needed to register items with the core.  Many
modules have ad-hoc code to make this pointer available to auxiliary sources.
This change updates the module build process to make the needed information
available to all sources in a module.

ASTERISK-25056 #close
Reported by: Corey Farrell

Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2015-05-04 20:47:01 -04:00
Tilghman Lesher
a8775172aa When using MALLOC_DEBUG, codec_lpc10 leaks memory, because it matches a library
malloc() with an ast_free (which, of course, doesn't match up with known
allocated memory, so the free fails).
(closes issue #13702)
 Reported by: eliel
 Patches: 
       codec_lpc10_lpcini.c uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-15 16:41:54 +00:00
Joshua Colp
4c2cfeeaed Merged revisions 45079 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45079 | file | 2006-10-13 14:42:49 -0400 (Fri, 13 Oct 2006) | 2 lines

And file said... let the compiler warnings STOP!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 18:45:44 +00:00
Kevin P. Fleming
3e41331bf3 get rid of some more compiler warnings (thanks tholo for making me fix the lpc10 stuff... that had been a problem for far too long)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 23:13:52 +00:00
Kevin P. Fleming
2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Mark Spencer
82d87fe9cc Fix include order
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-10-21 18:08:11 +00:00
Mark Spencer
c0d8f10a42 FreeBSD patch, take 2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-10-21 02:57:29 +00:00
Martin Pycko
13b7b73b08 Revert the previous patch since it's braking compilation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-10-16 21:11:29 +00:00
Mark Spencer
d5b54e4b7f Sane FreeBSD patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-10-16 10:44:04 +00:00
Matteo Brancaleoni
2bd936105e mer feb 12 14:56:57 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-02-12 13:59:15 +00:00
Mark Spencer
c340c2093c Version 0.3.0 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:40 +00:00
Mark Spencer
1cc89abf56 Version 0.2.0 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:39 +00:00
Mark Spencer
e001c19bec Version 0.1.12 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:38 +00:00
Mark Spencer
b0d73ea947 Version 0.1.11 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:36 +00:00
Mark Spencer
7e68a64751 Version 0.1.10 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:35 +00:00
Mark Spencer
1b0c5f3ac4 Version 0.1.9 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:35 +00:00
Mark Spencer
98511b9093 Version 0.1.8 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:33 +00:00
Mark Spencer
3fe1fe6462 Version 0.1.7 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:33 +00:00
Mark Spencer
17337b33ba Version 0.1.6 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:32 +00:00
Mark Spencer
ab7d243daf Version 0.1.5 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:31 +00:00
Mark Spencer
e58a5412db Version 0.1.4 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:30 +00:00
Mark Spencer
0ac7cc0094 Version 0.1.3 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:28 +00:00
Mark Spencer
6f0ba39ae5 Version 0.1.2 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2000-01-05 08:20:27 +00:00