summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-10Temp remove define for aligned attribute.sandbox/mkashkarov/sanitize_string_companyMikhail Kashkarov1-6/+1
Put it under build macros for libstdc++. Change-Id: I9797bb23ce02e176e9cc13a158c5f9f8d5866cb8
2018-05-08Fix annotation in _M_destroy for cow-strings.Mikhail Kashkarov1-1/+1
Perfrom annotation before deallocation, when *this is correct. Change-Id: I438cbf7dec143247185f6abda7033a7733b35ffb
2018-05-08Align internal representation in cow-string by 8.Mikhail Kashkarov1-1/+6
COW-strings are used as an exception strings still (yet), and since char buffer starts at "this + 1" ("this" in COW basic_string<>), where "this" is properly aligned, sizeof(*this) may be not aligned by 8 (12 bytes under i686 arch with current compiler), so asan annotations will fail. Still testing with all configurations. Change-Id: Ic7bb665a58d22f7e8ab979fc548fc96973473f32
2018-05-04Fix string::operator= with disable sso.Mikhail Kashkarov1-2/+5
Found this case during aarch64 build: __str may be null and setting new length with clear() will cause error. Change-Id: I93ad10b4c15ed293d1228243591a1ec1ed22c4d9
2018-05-03Fix basic_string::clear, swap funcs.Mikhail Kashkarov1-1/+1
Change-Id: I6d329a54ed9cfdd42103bb881c602d1d74f566a6
2018-04-28Fix basic_string::reserve in case of disabled SSOMikhail Kashkarov1-19/+11
Keep buffer alive after relocations. Change-Id: I71d0a6a2f23779b6c802661ae0a0095fdb1fd45c
2018-04-28Update setting correct string length.Mikhail Kashkarov2-45/+13
Change-Id: I2bd419bca8ae332b11e0ea29126a6935a34df70a
2018-04-27Correctly set new string length in case of disables SSO.Mikhail Kashkarov2-7/+45
Change-Id: I9dda8d2fb748660faa21c548a13199066c5dbf7f
2018-04-26Temp fix templates in locale_facets.tccMikhail Kashkarov1-0/+2
Change-Id: I7743c915f3146b500127cc7134333e76fdcaa69e
2018-04-26Add configure option for disabling basic_string small-size optimization.Mikhail Kashkarov2-0/+44
Change-Id: If22d32dae870ba1af0f32e3141c0399e39b51d37
2018-04-26Option for disabling std::string SSO.Mikhail Kashkarov4-64/+193
Change-Id: I1bcab282b2f48bf85f6686e70ef6bb1471d07150
2018-04-17Disable std::string sso by forcing dynamic allocations.Mikhail Kashkarov2-10/+31
String internal buffer for small-string optimization a). may be not aligned by 8 bytes (as class member) and b). not poisoned by asan properly with redzones. Need to perform this changes carefully as there are other libstdc++ headers that relies on std::string default structure and size by checking that with static assertations. So we cannot simply change sso-buffer size without changing them. For now simply immitate that sso-buffer is already full at given point of usage. Change-Id: I525716813c2a31c7d9e0d2a180d8112b54009fa6
2018-04-16Add project build options to disable string-SSO.Mikhail Kashkarov4-0/+4
std::string local buffer used in small-string optimization may be not aligned by 8 as asan requires on armv7l/i586 archs (small buffer in struct from libstdc++ lib passed on stack, which can be aligned by 4), so enable fully dynamic strings to fully annotate container. Note: Enabling fully dynamic string changes the library ABI. Add "libstdcxx_fully_dynamic_string=1" macros to project config for enabling. Change-Id: I4e7a7dc373ac0f2624d1fc854ae82956ff4402b3
2018-04-16Revert "Test: manually align local buf by 8 (data members for arm/i686);"Mikhail Kashkarov1-4/+0
This reverts commit 58f80958e199bbd7d97fede7a242642d7c5f6310.
2018-04-13Test: manually align local buf by 8 (data members for arm/i686);Mikhail Kashkarov1-0/+4
Change-Id: Id2194d6b276837beeb0b16f5b3fc6a88dcfc9b96
2018-04-13Clean up after pasting.Mikhail Kashkarov1-47/+0
Change-Id: I37681b4f67e5f117ec90d4b0c19b9e00be7233cd
2018-04-13Change length -> size for basic_stringbuf, clean up header.Mikhail Kashkarov1-5/+2
Change-Id: I751550619f9d5b50fde9b3503b40c1969e76bd32
2018-04-13Comment extern annotation func.Mikhail Kashkarov1-1/+3
Change-Id: I4fd4047913db2bf54b9660cb9bf1b0e0f6048793
2018-04-13Add missign annotation after cherry pick.Mikhail Kashkarov1-0/+1
Change-Id: I80fab9c1dba086d0fc1283412296c6b32c673966
2018-04-13Remove devel version for annotations (print names).Mikhail Kashkarov6-104/+82
Change-Id: I88d7f0db343afc70f3bed7fdc6d7ed0fe4a78a09
2018-04-13Cherry-pick std::basic_stringbuf::overflow fix.redi4-5/+78
PR libstdc++/81338 correctly manage string capacity Backport from mainline 2017-07-10 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/81338 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string): Declare basic_stringbuf to be a friend. * include/bits/sstream.tcc (basic_stringbuf::overflow) [_GLIBCXX_USE_CXX11_ABI]: Use unused capacity before reallocating. * include/std/sstream (basic_stringbuf::__xfer_bufptrs): Update string length to buffer length. * testsuite/27_io/basic_stringstream/assign/81338.cc: New. Change-Id: Ib654bfbe7b0d15561d0c617576262a678a1eb15c git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@251652 138bc75d-0d04-0410-961f-82ee72b054a4
2018-04-13Add weak attribute for __sanitizer_annotate_contiguous_container extern.Mikhail Kashkarov2-4/+2
Remove unused extern from asan. Change-Id: I4ef6a88cd57101020a02930d1947abf48093161a
2018-04-13Clean up: remove some comments from prev revisions.Mikhail Kashkarov4-272/+0
Change-Id: I9c9de63d3e7dde7fee7f302c718ca0d4e069dc5f
2018-04-13Working: gcc not bootstrapped, cmake, llvm initial build.Mikhail Kashkarov6-204/+375
Change-Id: Ibfc55a6d79bce2d1f339431fe8aac580ac570cd6
2018-04-13Fix missed extern decl; fix string reserve from grow to new.Mikhail Kashkarov2-2/+2
Change-Id: I715bfa4f01c686c01a37be0ce65982ab89283acb
2018-04-13Fix string reserve func, annotate operator <<.Mikhail Kashkarov2-2/+26
Change-Id: Icd644b6bf10d4b35255db9df4d3d48bb1ce85175
2018-04-13Revert "Remove devel asan annotation version."Mikhail Kashkarov3-4/+7
Devel asan for annotations. This reverts commit bd2063e96e13b17900cc9c5582fec66a8f3590b8.
2018-04-13Revert "Remove devel annotation version."Mikhail Kashkarov3-99/+107
Do some dev stuff. This reverts commit eb333e9b0d7afd2e4a21baa6c46225aa9438533c. Change-Id: I8dc99f1db98d3d2cd993cd5540f52efdae02e8e0
2018-04-13Fix extern param.Mikhail Kashkarov2-2/+2
Change-Id: I7902929e57505a33eba948b2c6856890f61e5235
2018-04-13Remove devel asan annotation version.Mikhail Kashkarov3-7/+4
Change-Id: Icaa7561c2d19e2d1942c7ce997a6b5543534411e
2018-04-13Remove opt def in spec file due to defines in libstdc++.Mikhail Kashkarov4-4/+4
Change-Id: Ie74d71ceae9f9b9a25a8300762e6550c114ccdc9
2018-04-13Revert "[Speed up build]: Revert "packaging: add fortran compiler""Mikhail Kashkarov3-6/+198
This reverts commit ca4fb28ca20fcf8ff648fbd2a7fcb772c3b169fc.
2018-04-13Remove devel annotation version.Mikhail Kashkarov3-107/+99
Change-Id: I5bfd15f2b26b4086aa5bd33f3d959df7a6e6047b
2018-04-13Devel version for annotations.Mikhail Kashkarov5-104/+128
Change-Id: Ida1819b120a0211630c626a7c95dff3e5c880030
2018-04-13Fix missing extern.Mikhail Kashkarov1-1/+3
Change-Id: If1268c053135a8408bf4b3da2d6ccb4ed1014745
2018-04-13Define guard them all.Mikhail Kashkarov3-56/+182
Change-Id: Ib3044086a1fbae5b3fab1ec975b3168c4acbfe9a
2018-04-13Restore missed visibility.Mikhail Kashkarov1-9/+4
Change-Id: I36baa8c71109131355f40e0a70183eac8e5785b0
2018-04-13Fix extern defining.Mikhail Kashkarov1-3/+3
Change-Id: I010fdb76c19d4bec42e6c9f85ee277bcb8960b08
2018-04-13Add define (non-cross builds) for string annotation to spec file.Mikhail Kashkarov4-0/+8
Change-Id: I33d22c8cd90779469cddfdf31258684f022063cb
2018-04-13Commented out define in annotate wrapper.Mikhail Kashkarov1-2/+2
Change-Id: I79c236e198a6cf30c1f925d9a0098b41a7531ae3
2018-04-13Revert "Temp replaced _GLIBCXX_HAS_ASAN with ↵Mikhail Kashkarov3-25/+25
_GLIBCXX_ADDRESS_SANITIZER_ANNOTATIONS." This reverts commit abfb6214333484da4bf58914fd456793e899e7c1.
2018-04-13Temp replaced _GLIBCXX_HAS_ASAN with _GLIBCXX_ADDRESS_SANITIZER_ANNOTATIONS.Mikhail Kashkarov3-25/+25
libtool doesn't get flags from gcc-force-options, checking flag globally. Change-Id: I66c9eaee75f55e7c59cd33f8c82ccaed0e2a1538
2018-04-13Commented out nill RAII allocator.Mikhail Kashkarov1-18/+20
Change-Id: I2df305b5ad4d68f18812b10af3b7406f3b439d10
2018-04-13Del friend operator<<.Mikhail Kashkarov1-16/+0
Change-Id: I3aeec2f497184ef13d3eb59a3e704c4d04b93596
2018-04-13Paste from working: add friends, remove visibility.Mikhail Kashkarov1-5/+31
Change-Id: Icdf7400902e67255c6a39a8aea918460e277062f
2018-04-13fix _GLIBCXX_HAS_ASAN macros usage.Mikhail Kashkarov1-32/+32
Change-Id: Ide6a2fff92adfad93845ca7d820d29f93d906d26
2018-04-13Cmt for build.Mikhail Kashkarov1-25/+4
Change-Id: Ib10852fb3767c78ae1ea119c869d059d071c4d53
2018-04-13Smth more after faile with ASAN check fail.Mikhail Kashkarov2-8/+13
Change-Id: If9e6c01f7278044dc047ff910d86fb8b40b85b87
2018-04-13Commented out annotate around __ostream_insert instantation.Mikhail Kashkarov1-2/+2
Change-Id: I551ea9b3e0936df86c5e5bb65e076d74e49b048a
2018-04-13Wrappers for template annotate __ostream_insert.Mikhail Kashkarov1-4/+25
Change-Id: I7ad9a91d9b82271be067f81e63e9355f1c60ac55