소스 검색

Merge branch 'fix_nonstandard_malloc_029' into maint-0.2.9

Nick Mathewson 5 년 전
부모
커밋
42c6ebda16
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      changes/bug20424_029_minimal
  2. 4 0
      configure.ac

+ 4 - 0
changes/bug20424_029_minimal

@@ -0,0 +1,4 @@
+  o Minor bugfixes (compilation):
+    - When compiling with --enable-openbsd-malloc or --enable-tcmalloc, tell
+      the compiler not to include the system malloc implementation. Fixes bug
+      20424; bugfix on 0.2.0.20-rc.

+ 4 - 0
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.