Hi.

The patch fixes the alloc-dealloc-mismatch reported by ASAN.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/cp/ChangeLog:

        PR c++/99687
        * module.cc (fini_modules): Call vec_free instead of delete.
---
 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. */
--
2.30.2

Reply via email to