diff options
author | LRN <lrn1986@gmail.com> | 2012-08-28 10:19:37 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2012-08-28 10:19:37 +0000 |
commit | d5e22448da44609433a2f29eea6f8b4f47fc4cbc (patch) | |
tree | c77da24eba2351041dd825eec6b09bbd04013587 | |
parent | d11fa474ca382431e4371d9e2ab03283a4e29465 (diff) | |
download | gnunet-d5e22448da44609433a2f29eea6f8b4f47fc4cbc.tar.gz gnunet-d5e22448da44609433a2f29eea6f8b4f47fc4cbc.zip |
Make poisoning configurable. Enable it on debug builds by default
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 78f7be9ab..9b4a0119c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -256,6 +256,26 @@ AC_ARG_ENABLE([logging], | |||
256 | ], []) | 256 | ], []) |
257 | AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise]) | 257 | AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise]) |
258 | 258 | ||
259 | # should memory poisoning be enabled? | ||
260 | AC_MSG_CHECKING(whether to poison freed memory) | ||
261 | AC_ARG_ENABLE([poisoning], | ||
262 | [AS_HELP_STRING([--enable-poisoning], [enable poisoning of freed memory (good for debugging)])], | ||
263 | [enable_poisoning=${enableval}], | ||
264 | [ | ||
265 | if test "x$extra_logging" != "xGNUNET_NO"; then | ||
266 | enable_poisoning="defaults to yes (extra logging is enabled)" | ||
267 | else | ||
268 | enable_poisoning=no | ||
269 | fi | ||
270 | ]) | ||
271 | AC_MSG_RESULT($enable_poisoning) | ||
272 | if test ! "x$enable_poisoning" = "xno"; then | ||
273 | enable_poisoning=1 | ||
274 | else | ||
275 | enable_poisoning=0 | ||
276 | fi | ||
277 | AC_DEFINE_UNQUOTED([ENABLE_POISONING],[$enable_poisoning],[1 if freed memory should be poisoned, 0 otherwise]) | ||
278 | |||
259 | if test $build = $target | 279 | if test $build = $target |
260 | then | 280 | then |
261 | AC_MSG_CHECKING([for working HMAC]) | 281 | AC_MSG_CHECKING([for working HMAC]) |