---
title: Cppcheck Open-Source 2.9 released
description: Update to cppcheck open-source.
---

[Cppcheck News](https://www.cppcheck.com/product-news)

# [Cppcheck Open-Source 2.9 released](https://www.cppcheck.com/product-news/cppcheck-open-source-2.9-released)

 Written by [Daniel Marjamäki](https://www.cppcheck.com/product-news/author/daniel-marjamäki) | Aug 28, 2022 5:26:00 PM

We are happy to announce the release of Cppcheck Open-Source 2.9!

Cppcheck Open-Source 2.9 reintroduces checks for negative allocations and VLA sizes from version 1.87, allows configuration for `pipe()` buffer size, and enhances Windows exception handling output. It introduces options to disable specific exception handling features and improves detection of redundant `std::string` and container operations. A new match function for addons enhances pattern matching capabilities. The release also extends math function evaluation in ValueFlow, improves lifetime analysis, propagates condition values, and adds debug intrinsics for detailed analysis.

Release notes:

- restored check for negative allocation (new\[\]) and negative VLA sizes from cppcheck 1.87 (LCppC backport)
- replaced hardcoded check for pipe() buffer size by library configuration option (LCppC backport)
- on Windows the callstack is now being written to the output specific via "--exception-handling"
- make it possible to disable the various exception handling parts via the CMake options "NO\_UNIX\_SIGNAL\_HANDLING", "NO\_UNIX\_BACKTRACE\_SUPPORT" and "NO\_WINDOWS\_SEH"
- detect more redundant calls of std::string::c\_str(), std::string::substr(), and unnecessary copies of containers
- Add a `match` function to addon similiar to `Token::Match` used internally by cppcheck: 
    - `|` for either-or tokens(ie `struct|class` to match either `struct` or `class`)
    - `!!` to negate a token
    - It supports the `%any%`, `%assign%`, `%comp%`, `%name%`, `%op%`, `%or%`, `%oror%`, and `%var%` keywords
    - It supports `(*)`, `{*}`, `[*]`, and `<*>` to match links
    - `@` can be added to bind the token to a name
    - `**` can be used to match until a token
- Add math functions which can be used in library function definition. This enables evaluation of more math functions in ValueFlow
- Further improve lifetime analysis with `this` pointers
- Propagate condition values from outer function calls
- Add debug intrinsics `debug_valueflow` and `debug_valuetype` to show more detail including source backtraces

[View full post](https://www.cppcheck.com/product-news/cppcheck-open-source-2.9-released)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Daniel Marjamäki"
  },
  "dateModified" : "2024-03-28T11:05:09.993Z",
  "datePublished" : "2022-08-28T17:26:00Z",
  "headline" : "Cppcheck Open-Source 2.9 released",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.cppcheck.com/product-news/cppcheck-open-source-2.9-released",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Cppcheck News"
  }
}
```