[all-commits] [llvm/llvm-project] 458a2e: [AMDGPU][Scheduler] Fix use-after-poison by printi...

Thurston Dang via All-commits all-commits at lists.llvm.org
Tue Jan 13 10:14:55 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 458a2e88cc0595e5456e37cdfbec9bd84d5e2dee
      https://github.com/llvm/llvm-project/commit/458a2e88cc0595e5456e37cdfbec9bd84d5e2dee
  Author: Thurston Dang <thurston at google.com>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

  Log Message:
  -----------
  [AMDGPU][Scheduler] Fix use-after-poison by printing before deleting (#175807)

A buildbot was failing with a use-after-poison
(https://lab.llvm.org/buildbot/#/builders/24/builds/16530) after
https://github.com/llvm/llvm-project/pull/175050:
```
==llc==1532559==ERROR: AddressSanitizer: use-after-poison on address 0xe26e74e12368 at pc 0xb36d41bd74dc bp 0xffffed72a450 sp 0xffffed72a448
READ of size 8 at 0xe26e74e12368 thread T0
    #0 0xb36d41bd74d8 in llvm::MachineInstr::print(llvm::raw_ostream&, bool, bool, bool, bool, llvm::TargetInstrInfo const*) const /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:1796:35
    #1 0xb36d3e221b08 in operator<< /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:2150:6
    #2 0xb36d3e221b08 in llvm::PreRARematStage::rollback(llvm::PreRARematStage::RollbackInfo const&, llvm::BitVector&) const /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:2363:57
...
```

This is because it was printing an instruction that had already been
deleted. This patch fixes this by reversing the order.



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