[all-commits] [llvm/llvm-project] dea08c: Fix RegionStore assertion failure after #127602 (#...

Balázs Benics via All-commits all-commits at lists.llvm.org
Fri Feb 28 06:48:53 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dea08c2b67f38dba707003374f41b2277ab564d4
      https://github.com/llvm/llvm-project/commit/dea08c2b67f38dba707003374f41b2277ab564d4
  Author: Balázs Benics <108414871+balazs-benics-sonarsource at users.noreply.github.com>
  Date:   2025-02-28 (Fri, 28 Feb 2025)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/RegionStore.cpp
    M clang/test/Analysis/region-store.cpp

  Log Message:
  -----------
  Fix RegionStore assertion failure after #127602 (#129224)

Basically, we may leave the loop because if exhaust the fields, array
elements or other subobjects to initialize.
In that case, the Bindings may be in an exhausted state, thus no further
addBinding calls are allowed.

Let's harden the code by sprinkling some early exists in the recursive
dispatcher functions.
And to actually fix the issue, I added a check guarding the single
unguarded addBinding right after a loop I mentioned.

Fixes #129211



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list