From be01647a18c654a83257038ad58cf438e2fd39bd Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 28 Nov 2015 17:29:39 +0000 Subject: [PATCH] Allowing the user full control over the values of MALLOC_CHECK_ and MALLOC_PERTURB_; nano shouldn't override them. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 7 ++++++- src/nano.c | 6 ------ src/nano.h | 4 ---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index d34219b0..5cbbfd15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-11-28 Benno Schulenberg + * src/nano.c (main): Allow the user full control over the values of + MALLOC_CHECK_ and MALLOC_PERTURB_; nano shouldn't override these. + This reverts r5344 from August 6. + 2015-11-26 Benno Schulenberg * src/text.c (do_redo): Not just the undoing, also the redoing of a Backspace at EOF is a special case. This fixes Savannah bug #46532. @@ -213,7 +218,7 @@ GNU nano 2.4.3 - 2015.11.18 2015-08-06 Benno Schulenberg * src/nano.c (main): For --enable-debug builds, let malloc() help to find initialization failures and uses-after-free. Suggested by - Mike Frysinger. + Mike Frysinger. [Reverted in r5446 on November 28.] * doc/texinfo/nano.texi: Improve the formatting, using @t to mark double-quoted literal strings, @: to mark periods that do not end sentences, and @. to mark a finishing period after a capital. diff --git a/src/nano.c b/src/nano.c index 421ba3f9..7401a411 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2189,12 +2189,6 @@ int main(int argc, char **argv) }; #endif -#ifdef DEBUG - /* Help to find failed-to-initialize and use-after-free problems. */ - mallopt(M_CHECK_ACTION, 3); - mallopt(M_PERTURB, 0x4c); -#endif - #ifdef ENABLE_UTF8 { /* If the locale set exists and uses UTF-8, we should use diff --git a/src/nano.h b/src/nano.h index e2cbf3d5..b2604a17 100644 --- a/src/nano.h +++ b/src/nano.h @@ -54,10 +54,6 @@ #include #endif -#ifdef DEBUG -#include -#endif - /* Suppress warnings for __attribute__((warn_unused_result)). */ #define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0) -- 2.39.5