[all-commits] [llvm/llvm-project] 097fef: [SPIRV] Fix asan failure (#138695)

Steven Perron via All-commits all-commits at lists.llvm.org
Tue May 6 14:50:39 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 097fef28dae145cc41f80151825e929668414d24
      https://github.com/llvm/llvm-project/commit/097fef28dae145cc41f80151825e929668414d24
  Author: Steven Perron <stevenperron at google.com>
  Date:   2025-05-06 (Tue, 06 May 2025)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp

  Log Message:
  -----------
  [SPIRV] Fix asan failure (#138695)

When the DataLayout is destroyed, the memory backing `Offsets` is
released. This causes a use after free.

To fix it, I added a DataLayout varible that will not be destroyed until
after Offsets is used.

Fixes asan failure caused by
https://github.com/llvm/llvm-project/pull/135789



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