[all-commits] [llvm/llvm-project] 8c97a2: [Clang] Fix null-pointer assertion reading CtorClo...

Wenju He via All-commits all-commits at lists.llvm.org
Tue Jul 7 04:39:05 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c97a2edd20343c7729f76f7b119e024eb6530cc
      https://github.com/llvm/llvm-project/commit/8c97a2edd20343c7729f76f7b119e024eb6530cc
  Author: Wenju He <wenju.he at intel.com>
  Date:   2026-07-07 (Tue, 07 Jul 2026)

  Changed paths:
    M clang/lib/Serialization/ASTReaderDecl.cpp
    A clang/test/PCH/dllexport-ctor-closure-copy.cpp

  Log Message:
  -----------
  [Clang] Fix null-pointer assertion reading CtorClosureDefaultArgs (#207917)

BuildCtorClosureDefaultArgs deliberately leaves the first default-arg
slot null for MS ABI copy-constructor closures (the closure itself
supplies that argument), and ASTWriterDecl.cpp serializes the null. But
e7924d50db0a deserialized it with cast<>, which asserts on null. This
only triggers under the MS C++ ABI, e.g. when throwing a class with a
non-trivial copy constructor by value across a PCH boundary, as in test

https://github.com/intel/llvm/blob/cb9b7b7/clang-tools-extra/clangd/test/sycl.test

Assisted by: Claude



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