HomePhabricator

Fix CFI issues in <future>

Authored by eugenis on Aug 6 2020, 11:32 AM.

Description

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

Details

Committed
eugenisAug 6 2020, 12:05 PM
Differential Revision
D82627: Fix CFI issues in <future>
Parents
rG87ce06e31557: Add freeze keyword to IR emacs mode
Branches
Unknown
Tags
Unknown