[all-commits] [llvm/llvm-project] 889dfd: [libc][msan] Fix "non-constexpr function '__msan_u...

Guillaume Chatelet via All-commits all-commits at lists.llvm.org
Wed Apr 17 01:04:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 889dfd4ab35892840f2bd2d6d7fed6fac025e18e
      https://github.com/llvm/llvm-project/commit/889dfd4ab35892840f2bd2d6d7fed6fac025e18e
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   2024-04-17 (Wed, 17 Apr 2024)

  Changed paths:
    M libc/src/__support/macros/sanitizer.h

  Log Message:
  -----------
  [libc][msan] Fix "non-constexpr function '__msan_unpoison' cannot be used in a constant expression" (#88719)

Prior to this patch, calling `cpp::bit_cast<T>` in `constexpr`
expressions under `-fsanitize=memory` would fail with the following
message "non-constexpr function '__msan_unpoison' cannot be used in a
constant expression".

This patch makes sure that the `__msan_unpoison` expression is guarded
by `!__builtin_is_constant_evaluated()`.



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