diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-11 09:36:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-11 09:37:29 -0400 |
commit | 16bdbddc2cab90e360002b3440a4ed634e3c87f1 (patch) | |
tree | bb30e121cb4d0cb5d5c8015e8777e98ea5d15725 /configure.ac | |
parent | 8b53dfc3626f293f821b8e8afe88cca62224f20b (diff) | |
download | tor-16bdbddc2cab90e360002b3440a4ed634e3c87f1.tar.gz tor-16bdbddc2cab90e360002b3440a4ed634e3c87f1.zip |
When setting a nonstandard malloc, disable the system malloc.
Closes ticket 20424.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 279660d9b2..d700329925 100644 --- a/configure.ac +++ b/configure.ac @@ -1438,6 +1438,10 @@ fi if test "$using_custom_malloc" = "no"; then AC_CHECK_FUNCS(mallinfo) fi +if test "$using_custom_malloc" = "yes"; then + # Tell the C compiler not to use the system allocator functions. + TOR_CHECK_CFLAGS([-fno-builtin-malloc -fno-builtin-realloc -fno-builtin-calloc -fno-builtin-free]) +fi # By default, we're going to assume we don't have mlockall() # bionic and other platforms have various broken mlockall subsystems. |