[all-commits] [llvm/llvm-project] fde9ee: [clang][bytecode] Don't deallocate dynamic blocks ...

Timm Baeder via All-commits all-commits at lists.llvm.org
Fri Aug 8 04:02:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fde9ee1ac291652718124257796efff91a2d5baf
      https://github.com/llvm/llvm-project/commit/fde9ee1ac291652718124257796efff91a2d5baf
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2025-08-08 (Fri, 08 Aug 2025)

  Changed paths:
    M clang/lib/AST/ByteCode/DynamicAllocator.cpp
    M clang/lib/AST/ByteCode/DynamicAllocator.h
    M clang/lib/AST/ByteCode/InterpBlock.cpp
    M clang/lib/AST/ByteCode/InterpState.cpp

  Log Message:
  -----------
  [clang][bytecode] Don't deallocate dynamic blocks with pointers (#152672)

This fixes the edge case we had with variables pointing to dynamic
blocks, which forced us to convert basically *all* dynamic blocks to
DeadBlock when deallocating them.

We now don't run dynamic blocks through InterpState::deallocate() but
instead add them to a DeadAllocations list when they are deallocated but
still have pointers.

As a consequence, not all blocks with Block::IsDead = true are
DeadBlocks.



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