[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 194/411: memdebug: remove 9 year old unused debug function
From: |
gnunet |
Subject: |
[gnurl] 194/411: memdebug: remove 9 year old unused debug function |
Date: |
Wed, 13 Jan 2021 01:20:09 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 82d66f15825b2a088ba9302e2917e0548b1fe75f
Author: Emil Engler <me@emilengler.com>
AuthorDate: Thu Sep 17 17:13:11 2020 +0200
memdebug: remove 9 year old unused debug function
There used to be a way to have memdebug fill allocated memory. 9 years
later this has no value there (valgrind and ASAN etc are way better). If
people need to know about it they can have a look at VCS logs.
Closes #5973
---
lib/memdebug.c | 51 ---------------------------------------------------
1 file changed, 51 deletions(-)
diff --git a/lib/memdebug.c b/lib/memdebug.c
index da75c9f5d..6c5608474 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -35,52 +35,6 @@
#include "curl_memory.h"
#include "memdebug.h"
-/*
- * Until 2011-08-17 libcurl's Memory Tracking feature also performed
- * automatic malloc and free filling operations using 0xA5 and 0x13
- * values. Our own preinitialization of dynamically allocated memory
- * might be useful when not using third party memory debuggers, but
- * on the other hand this would fool memory debuggers into thinking
- * that all dynamically allocated memory is properly initialized.
- *
- * As a default setting, libcurl's Memory Tracking feature no longer
- * performs preinitialization of dynamically allocated memory on its
- * own. If you know what you are doing, and really want to retain old
- * behavior, you can achieve this compiling with preprocessor symbols
- * CURL_MT_MALLOC_FILL and CURL_MT_FREE_FILL defined with appropriate
- * values.
- */
-
-#ifdef CURL_MT_MALLOC_FILL
-# if (CURL_MT_MALLOC_FILL < 0) || (CURL_MT_MALLOC_FILL > 0xff)
-# error "invalid CURL_MT_MALLOC_FILL or out of range"
-# endif
-#endif
-
-#ifdef CURL_MT_FREE_FILL
-# if (CURL_MT_FREE_FILL < 0) || (CURL_MT_FREE_FILL > 0xff)
-# error "invalid CURL_MT_FREE_FILL or out of range"
-# endif
-#endif
-
-#if defined(CURL_MT_MALLOC_FILL) && defined(CURL_MT_FREE_FILL)
-# if (CURL_MT_MALLOC_FILL == CURL_MT_FREE_FILL)
-# error "CURL_MT_MALLOC_FILL same as CURL_MT_FREE_FILL"
-# endif
-#endif
-
-#ifdef CURL_MT_MALLOC_FILL
-# define mt_malloc_fill(buf,len) memset((buf), CURL_MT_MALLOC_FILL, (len))
-#else
-# define mt_malloc_fill(buf,len) Curl_nop_stmt
-#endif
-
-#ifdef CURL_MT_FREE_FILL
-# define mt_free_fill(buf,len) memset((buf), CURL_MT_FREE_FILL, (len))
-#else
-# define mt_free_fill(buf,len) Curl_nop_stmt
-#endif
-
struct memdebug {
size_t size;
union {
@@ -173,8 +127,6 @@ void *curl_dbg_malloc(size_t wantedsize, int line, const
char *source)
mem = (Curl_cmalloc)(size);
if(mem) {
- /* fill memory with junk */
- mt_malloc_fill(mem->mem, wantedsize);
mem->size = wantedsize;
}
@@ -321,9 +273,6 @@ void curl_dbg_free(void *ptr, int line, const char *source)
# pragma warning(pop)
#endif
- /* destroy */
- mt_free_fill(mem->mem, mem->size);
-
/* free for real */
(Curl_cfree)(mem);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 137/411: vtls: deduplicate client certificates in ssl_config_data, (continued)
- [gnurl] 137/411: vtls: deduplicate client certificates in ssl_config_data, gnunet, 2021/01/12
- [gnurl] 196/411: TODO: SSH over HTTPS proxy with more backends, gnunet, 2021/01/12
- [gnurl] 138/411: tool_urlglob: fix compiler warning "unreachable code", gnunet, 2021/01/12
- [gnurl] 189/411: ftp: make a 552 response return CURLE_REMOTE_DISK_FULL, gnunet, 2021/01/12
- [gnurl] 236/411: projects/build-wolfssl.bat: fix the copyright year range, gnunet, 2021/01/12
- [gnurl] 212/411: curl: make --libcurl show binary posts correctly, gnunet, 2021/01/12
- [gnurl] 190/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 240/411: test122[12]: remove these two tests, gnunet, 2021/01/12
- [gnurl] 250/411: tool_operate: fix compiler warning when --libcurl is disabled, gnunet, 2021/01/12
- [gnurl] 218/411: ldap: reduce the amount of #ifdefs needed, gnunet, 2021/01/12
- [gnurl] 194/411: memdebug: remove 9 year old unused debug function,
gnunet <=
- [gnurl] 187/411: test163[12]: require http to be built-in to run, gnunet, 2021/01/12
- [gnurl] 217/411: runtests: provide curl's version string as %VERSION for tests, gnunet, 2021/01/12
- [gnurl] 220/411: --help: move two options from the misc category, gnunet, 2021/01/12
- [gnurl] 243/411: connect: repair build without ipv6 availability, gnunet, 2021/01/12
- [gnurl] 206/411: tests/README: convert to markdown, gnunet, 2021/01/12
- [gnurl] 249/411: checksrc: warn on empty line before open brace, gnunet, 2021/01/12
- [gnurl] 208/411: TODO: Add OpenBSD libtool notice, gnunet, 2021/01/12
- [gnurl] 209/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 213/411: tool_setopt: escape binary data to hex, not octal, gnunet, 2021/01/12
- [gnurl] 260/411: curl_url_set.3: fix typo in the RETURN VALUE section, gnunet, 2021/01/12