[all-commits] [llvm/llvm-project] 98ea51: [clang][bytecode] Clear inactive union fields when...

Timm Baeder via All-commits all-commits at lists.llvm.org
Wed Apr 9 21:12:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98ea512f720ec954a6f096dbb39534f06affa196
      https://github.com/llvm/llvm-project/commit/98ea512f720ec954a6f096dbb39534f06affa196
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2025-04-10 (Thu, 10 Apr 2025)

  Changed paths:
    M clang/lib/AST/ByteCode/InterpBuiltin.cpp
    A clang/test/AST/ByteCode/libcxx/minmax.cpp

  Log Message:
  -----------
  [clang][bytecode] Clear inactive union fields when copying (#134982)

When copying unions, we need to only copy the active field of the source
union, which we were already doing. However, we also need to zero out
the (now) inactive fields, so we don't end up with dangling pointers in
those inactive fields.



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