[all-commits] [llvm/llvm-project] 44d9be: [rtsan][test] Prevent test check from being optimi...

Paul Kirth via All-commits all-commits at lists.llvm.org
Tue Jan 14 11:55:41 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44d9beef7d28f4a4d73acb12ea030bb642eff1d2
      https://github.com/llvm/llvm-project/commit/44d9beef7d28f4a4d73acb12ea030bb642eff1d2
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

  Changed paths:
    M compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp

  Log Message:
  -----------
  [rtsan][test] Prevent test check from being optimized out in LTO builds (#122524)

In LTO builds, some test checks can be optimized away, since the
compiler can
see through the memory accesses after inlining across TUs. This causes
the existing death tests to fail, since the functions are completely
optimized out and things like copying a lambda will no longer occur and
trigger the sanitizer.

To prevent that, we can use an empty inline assembly block to tell the
compiler that memory is modified, and prevent it from doing that.



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