projects
/
platform
/
upstream
/
xz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0e19e0
)
Don't fill allocated memory with 0xFD when debugging is
author
Lasse Collin
<lasse.collin@tukaani.org>
Mon, 10 Mar 2008 11:41:25 +0000
(13:41 +0200)
committer
Lasse Collin
<lasse.collin@tukaani.org>
Mon, 10 Mar 2008 11:41:25 +0000
(13:41 +0200)
enabled. It hides errors from Valgrind.
src/liblzma/common/allocator.c
patch
|
blob
|
history
diff --git
a/src/liblzma/common/allocator.c
b/src/liblzma/common/allocator.c
index
edea0f6
..
c597031
100644
(file)
--- a/
src/liblzma/common/allocator.c
+++ b/
src/liblzma/common/allocator.c
@@
-36,9
+36,10
@@
lzma_alloc(size_t size, lzma_allocator *allocator)
ptr = malloc(size);
#if !defined(NDEBUG) && defined(HAVE_MEMSET)
- // This helps to catch some stupid mistakes.
- if (ptr != NULL)
- memset(ptr, 0xFD, size);
+ // This helps to catch some stupid mistakes, but also hides them from
+ // Valgrind. Uncomment when useful.
+// if (ptr != NULL)
+// memset(ptr, 0xFD, size);
#endif
return ptr;