From owner-svn-src-stable-10@freebsd.org Thu Oct 8 18:02:44 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E0C29D1525; Thu, 8 Oct 2015 18:02:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 557C16C0; Thu, 8 Oct 2015 18:02:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t98I2h31046580; Thu, 8 Oct 2015 18:02:43 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t98I2hpm046579; Thu, 8 Oct 2015 18:02:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510081802.t98I2hpm046579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 8 Oct 2015 18:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289047 - stable/10/contrib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 18:02:44 -0000 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);