[all-commits] [llvm/llvm-project] 189ba3: Fix CFI issues in <future>

Evgenii Stepanov via All-commits all-commits at lists.llvm.org
Thu Aug 6 12:05:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 189ba3db8653eaefc191599dd60d9aa6b0127c44
      https://github.com/llvm/llvm-project/commit/189ba3db8653eaefc191599dd60d9aa6b0127c44
  Author: Evgenii Stepanov <eugenis at google.com>
  Date:   2020-08-06 (Thu, 06 Aug 2020)

  Changed paths:
    M libcxx/include/future

  Log Message:
  -----------
  Fix CFI issues in <future>

This change fixes errors reported by Control Flow Integrity (CFI) checking when using `std::packaged_task`.  The errors mostly stem from casting the underlying storage (`__buf_`) to `__base*`, even if it is uninitialized.  The solution is to wrap `__base*` access to `__buf_` behind a getter marked with _LIBCPP_NO_CFI.

Differential Revision: https://reviews.llvm.org/D82627




More information about the All-commits mailing list