[2/2] Add AddressSanitizer annotations to std::string.

Mikhail Kashkarov m.kashkarov@partner.samsung.com
Tue May 29 06:55:00 GMT 2018


Add AddressSanitizer annotations to std::string.

     * include/bits/basic_string.h [_GLIBCXX_USE_DUAL_ABI]
     (_GLIBCXX_SANITIZER_ANNOTATE_STRING): Define.
     (_GLIBCXX_SANITIZER_ALIGN): Define.
     (_asan_traits<_CharT, _Alloc>, _asan_traits<_CharT, allocator<_CharT>)
     (_asan_traits::__annotate_delete, _asan_traits::__annotate_new)
     (_asan_traits::__annotate_grow): New traits for annotation.
(basic_string::__RAII_IncreaseAnnotator::__RAII_Increaseannotator)
     (basic_string::__RAII_IncreaseAnnotator::done)
(basic_string::__RAII_IncreaseAnnotator::~RAII_Increaseannotator):
     New annotation helpers in case of exceptions.
     (basic_string::__get_beg, basic_string::__get_mid)
     (basic_string::__get_end): New annotation helpers.
     (basis_string::_M_dispose, basic_string::_M_destroy)
     (basic_string::basic_string(basic_string&& __str))
     (basic_string::basic_string(basic_string&& __str, const _Alloc& __a))
     (basic_string::operator=(constbasic_string& __str))
     (basic_string::operator=(basic_string&& __str))
     (basic_string::clear, basic_string::push_back): Annotate.
     [!_GLIBCXX_USE_DUAL_ABI]
     (_asan_traits<_CharT, _Alloc>, _asan_traits<_CharT, allocator<_CharT>)
     (_asan_traits::__annotate_delete, _asan_traits::__annotate_new)
     (_asan_traits::__annotate_grow): New traits for annotation.
(basic_string::__RAII_IncreaseAnnotator::__RAII_Increaseannotator)
     (basic_string::__RAII_IncreaseAnnotator::done)
(basic_string::__RAII_IncreaseAnnotator::~RAII_Increaseannotator):
     New annotation helpers in case of exceptions.
     (basic_string::__get_beg, basic_string::__get_mid)
     (basic_string::__get_end): New annotation helpers.
     (basic_string::_Rep_base): Align by 8 when annotations are anabled.
     (basic_string::push_back): Annotate
     * include/bits/basic_string.tcc [_GLIBCXX_USE_DUAL_ABI]
     (basic_string::swap, basic_string::_M_construct)
     (basic_string::_M_assign, basic_string::reserve)
     (basic_string::_M_mutate, basic_string::_M_erase)
     (basic_string::resize, basic_string::_M_append)
     (basic_string::_M_replace): Annotate.
     [!_GLIBCXX_USE_DUAL_ABI]
     (basic_string::_S_construct)
     (basic_string::append(const _CharT* __s, size_type __n))
     (basic_string::append(const basic_string& __str))
     (basic_string::_M_destroy, basic_string::_M_mutate)
     (basic_string::_S_create, basic_string::_M_clone): Annotate.
     [_GLIBCXX_SANITIZE_STRING]
     Disable template implicit instantiation declarations for annotations.
     * libstdc++-v3/include/bits/sstream.tcc
     (basic_stringbuf::overflow, basic_stringbuf::_M_sync): Annotate
     Disable template implicit instantiation declarations for annotations.
     * libstdc++-v3/include/bits/locale_facets.tcc:
     Disable template implicit instantiation declarations for annotations.
     * libstdc++-v3/include/bits/fstream.tcc: Likewise.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-AddressSanitizer-annotations-to-std-string.patch
Type: text/x-patch
Size: 33854 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180529/ab433575/attachment.bin>


More information about the Libstdc++ mailing list