From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 10EA13858004; Mon, 22 Mar 2021 12:01:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10EA13858004 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-7761] C++ modules: fix alloc-dealloc-mismatch ASAN issue X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: c38f679eebffd601d977330f24def69f4b620c93 X-Git-Newrev: c4519fe3db366d781f342b7f04c4a09e4cc9fbd9 Message-Id: <20210322120134.10EA13858004@sourceware.org> Date: Mon, 22 Mar 2021 12:01:34 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 12:01:34 -0000 https://gcc.gnu.org/g:c4519fe3db366d781f342b7f04c4a09e4cc9fbd9 commit r11-7761-gc4519fe3db366d781f342b7f04c4a09e4cc9fbd9 Author: Martin Liska Date: Sat Mar 20 20:57:13 2021 +0100 C++ modules: fix alloc-dealloc-mismatch ASAN issue gcc/cp/ChangeLog: PR c++/99687 * module.cc (fini_modules): Call vec_free instead of delete. Diff: --- gcc/cp/module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 6dbdc926cb4..551cb66a6d4 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -20009,7 +20009,7 @@ fini_modules () modules_hash = NULL; /* Or entity array. We still need the entity map to find import numbers. */ - delete entity_ary; + vec_free (entity_ary); entity_ary = NULL; /* Or remember any pending entities. */