Add AddressSanitizer annotations to std::string
Jonathan Wakely
jwakely@redhat.com
Tue May 29 12:47:00 GMT 2018
On 29/05/18 09:51 +0300, Mikhail Kashkarov wrote:
>Hello,
>
>I'd like to propose following features for the review:
>
>[1] Add option to disable std::string small-string optimization usage.
>Add _GLIBCXX_DISABLE_SSO_USAGE define that disables c++11 std::string
>_M_local_buf usage to let AddressSanitizer poison string buffer correctly.
>
>[2] Add AddressSanitizer annotations to std::string.
>String annotations can be enabled with _GLIBCXX_ANNOTATE_STRING define.
>For COW-strings annotation we need to align the beginning of string
>buffer by 8
>(ASan requirements), so the layout change is applied if annotations in on.
>This work is based on Ivan Baravy draft patches for string annotations.
Thanks for the patches, I'll comment on the two emails individually.
>Also, while testing annotations for older compiler versions I managed to
>find
>libstdc++ bugs in std::regex/std::basic_stringbuf that are fixed in
>upstream now so it could be useful not only for testing projects but for the
>library itself.
That's good to know.
Were there bugzilla reports for these bugs you found? I'd like to be
sure they were fixed intentionally and that we have tests to ensure
the bugs don't get re-introduced later.
More information about the Libstdc++
mailing list