summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-11-18 11:43:08 +0000
committerZeev Suraski <zeev@php.net>2000-11-18 11:43:08 +0000
commit42b0e1cb1f90d36735265e0c2d51cbb6c8c2983d (patch)
tree25ee703e5d21cc9934608c2f4f67c71764bd9679 /Zend/zend_alloc.c
parent66c667c9741fe839f283848c89d7e4c454fd12bf (diff)
downloadphp-git-42b0e1cb1f90d36735265e0c2d51cbb6c8c2983d.tar.gz
Forgot to commit the non-debug build fix yesterday...
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index dd17fb33ba..1741ce211c 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -199,13 +199,11 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
DECLARE_CACHE_VARS
ALS_FETCH();
-#ifdef ZTS
+#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
-# if ZEND_DEBUG
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x freed at %s:(%d) on thread %x, ignoring",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
-# endif
return;
}
#endif
@@ -270,15 +268,13 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
-#ifdef ZTS
+#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
void *new_p;
-# if ZEND_DEBUG
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x reallocated at %s:(%d) on thread %x, duplicating",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
-# endif
new_p = _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
memcpy(new_p, ptr, p->size);
return new_p;