svn commit: r289047 - stable/10/contrib/libcxxrt
Bryan Drewery
bdrewery at FreeBSD.org
Thu Oct 8 18:02:44 UTC 2015
Author: bdrewery
Date: Thu Oct 8 18:02:43 2015
New Revision: 289047
URL: https://svnweb.freebsd.org/changeset/base/289047
Log:
MFC r288238:
MFV c3ccd112: Correct off-by-ones in free_exception of emergency buffer
Modified:
stable/10/contrib/libcxxrt/exception.cc
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/contrib/libcxxrt/exception.cc
==============================================================================
--- stable/10/contrib/libcxxrt/exception.cc Thu Oct 8 18:01:56 2015 (r289046)
+++ stable/10/contrib/libcxxrt/exception.cc Thu Oct 8 18:02:43 2015 (r289047)
@@ -516,7 +516,7 @@ static void emergency_malloc_free(char *
break;
}
}
- assert(buffer > 0 &&
+ assert(buffer >= 0 &&
"Trying to free something that is not an emergency buffer!");
// emergency_malloc() is expected to return 0-initialized data. We don't
// zero the buffer when allocating it, because the static buffers will
@@ -556,7 +556,7 @@ static void free_exception(char *e)
{
// If this allocation is within the address range of the emergency buffer,
// don't call free() because it was not allocated with malloc()
- if ((e > emergency_buffer) &&
+ if ((e >= emergency_buffer) &&
(e < (emergency_buffer + sizeof(emergency_buffer))))
{
emergency_malloc_free(e);
More information about the svn-src-all
mailing list