# Valgrind "Mismatched new/delete size" not reported as a memory issue

**URL:** https://discourse.cmake.org/t/valgrind-mismatched-new-delete-size-not-reported-as-a-memory-issue/15740
**Category:** Development
**Tags:** tool:ctest
**Created:** [July 8, 2026, 3:58pm UTC](https://discourse.cmake.org/t/valgrind-mismatched-new-delete-size-not-reported-as-a-memory-issue/15740 "2026-07-08T15:58:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![npoletz](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/n/b5ac83/32.png) [@npoletz](https://discourse.cmake.org/u/npoletz)
#### Post date: [July 8, 2026, 3:58pm UTC](https://discourse.cmake.org/t/valgrind-mismatched-new-delete-size-not-reported-as-a-memory-issue/15740/1 "2026-07-08T15:58:48Z")

</div>

Hello,

I recently encounter a `Mismatched new/delete size value` reported by valgrind but captured by cmake and thus not reported on our dashboard.

The problem seems to be a missing regex in [ProcessMemCheckValgrindOutput](https://gitlab.kitware.com/cmake/cmake/-/blob/v4.3.4/Source/CTest/cmCTestMemCheckHandler.cxx#L929-960) which only reports `R"(== .*Mismatched free\(\) / delete / delete \[\])")` as `Mismatched deallocation`.

Would it be possible to add a specific regex or extend the existing one?

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [July 8, 2026, 4:01pm UTC](https://discourse.cmake.org/t/valgrind-mismatched-new-delete-size-not-reported-as-a-memory-issue/15740/2 "2026-07-08T16:01:29Z")

</div>

> [@npoletz](#):
>
> Would it be possible to add a specific regex or extend the existing one?

I’d welcome a merge request to do that, yes, thanks.
