gecko-dev/xpcom/string
Henri Sivonen 13e736d609 Bug 1490972 - Limit the number of bytes poisoned to avoid quadratic behavior. r=froydnj
XPCOM strings mark logically unused parts of nsStringBuffer as uninitialized
in debug builds by writing a marker byte and if memory checking is active,
by telling the memory checking that the range of memory is uninitialized.

This patch limits such marking to up to 16 code units to avoid quadratic
behavior, which is especially bad when there's a large disparity between
length and capacity (after a call to SetCapacity()).

The assumption here is that even a small poisoned memory range is enough
to detect the bugs that the poisoning is intended to detect.

MozReview-Commit-ID: 178rp0ckztj

Differential Revision: https://phabricator.services.mozilla.com/D5838

--HG--
extra : moz-landing-system : lando
2018-09-14 18:58:15 +00:00
..
crashtests
moz.build Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsASCIIMask.cpp
nsASCIIMask.h Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond 2018-04-09 21:12:13 +10:00
nsAString.h Bug 1434789 - Part 2: Remove nsSubstringTuple aliases. r=froydnj 2018-01-31 16:45:34 -08:00
nsCharTraits.h Bug 1486711 - Fill logically uninitialized parts of an XPCOM string's buffer with a marker byte in debug builds. r=froydnj 2018-09-07 05:47:57 +00:00
nsDependentString.cpp
nsDependentString.h
nsDependentSubstring.cpp
nsDependentSubstring.h Bug 1435924 - Part 1: Switch from nsSubstring.h to nsAString.h. r=dbaron 2018-02-05 17:36:32 -08:00
nsLiteralString.h
nsPrintfCString.h
nsPromiseFlatString.cpp
nsPromiseFlatString.h
nsReadableUtils.cpp Bug 1487050 - Remove CountCharInReadable() as dead code. r=froydnj 2018-09-04 14:48:39 +00:00
nsReadableUtils.h Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan 2018-09-07 14:47:51 +00:00
nsString.cpp
nsString.h Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsStringBuffer.h
nsStringComparator.cpp
nsStringFlags.h Bug 1448138 - Rename string DataFlags::SHARED to REFCOUNTED to make it clearer to those reading the code. r=erahm 2018-03-23 17:31:37 -07:00
nsStringFwd.h Bug 1399789 - nsSubstringSplitter/nsCSubstringSplitter is not defined anymore; r=erahm 2018-08-09 14:18:22 +02:00
nsStringIterator.h Bug 1453795 - XPCom/String - Initialize member fields in classes/ structures. r=froydnj 2018-06-14 13:57:45 +03:00
nsStringObsolete.cpp
nsSubstring.cpp Bug 1482828 - Introduce C++ analogs of Rust's nsA[C]StringBulkWriteHandle. r=froydnj 2018-08-28 16:42:26 +00:00
nsTDependentString.cpp
nsTDependentString.h Bug 1431261 - Add nsTDependentString copy constructor. r=dbaron 2018-01-18 14:16:19 -08:00
nsTDependentSubstring.cpp Bug 1426898 - Stop including Char16.h everywhere. r=Waldo 2017-12-23 00:53:12 +09:00
nsTDependentSubstring.h
nsTextFormatter.cpp Bug 1435916 - use a const array in nsTextFormatter::dosprintf; r=tromey 2018-02-14 12:01:36 -05:00
nsTextFormatter.h
nsTLiteralString.h
nsTPromiseFlatString.cpp
nsTPromiseFlatString.h
nsTString.cpp
nsTString.h Bug 1481097 - xpcom: Remove nsTString literal string workaround for gcc 4.9 bug. r=nika 2018-07-22 00:02:34 -07:00
nsTStringComparator.cpp
nsTStringObsolete.cpp Bug 1482828 - Introduce C++ analogs of Rust's nsA[C]StringBulkWriteHandle. r=froydnj 2018-08-28 16:42:26 +00:00
nsTStringRepr.h Bug 1481097 - xpcom: Remove nsTString literal string workaround for gcc 4.9 bug. r=nika 2018-07-22 00:02:34 -07:00
nsTSubstring.cpp Bug 1490972 - Limit the number of bytes poisoned to avoid quadratic behavior. r=froydnj 2018-09-14 18:58:15 +00:00
nsTSubstring.h Bug 1490972 - Limit the number of bytes poisoned to avoid quadratic behavior. r=froydnj 2018-09-14 18:58:15 +00:00
nsTSubstringTuple.cpp
nsTSubstringTuple.h Bug 1434689 - Part 3: Annotate nsTSubstringTuple as MOZ_TEMPORARY_CLASS. r=froydnj 2018-01-31 15:45:04 -08:00
nsUTF8Utils.h Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
precompiled_templates.cpp
README.html

<html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<body>
  <h1><span class="LXRSHORTDESC">managing sequences of characters</span></h1>
<p>
  <span class="LXRLONGDESC"></span>
</p>
</body>
</html>