This is an archive of the discontinued LLVM Phabricator instance.

libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI.
ClosedPublic

Authored by pcc on Aug 14 2018, 4:05 PM.

Details

Summary

This constructor needs to cast a pointer to uninitialized
memory to a pointer to object type in order to call
allocator_traits::construct(). This cast is not allowed when CFI cast
checks are enabled.

I did this instead of marking __addr() as _LIBCPP_NO_CFI so that we
don't lose CFI checks on get() or the dtor.

Diff Detail

Repository
rCXX libc++

Event Timeline

pcc created this revision.Aug 14 2018, 4:05 PM
This revision is now accepted and ready to land.Aug 15 2018, 7:12 AM
This revision was automatically updated to reflect the committed changes.