Closed Bug 1484990 Opened 2 years ago Closed 2 years ago
Avoid writing past the logical length of a string in XHR
46 bytes, text/x-phabricator-request
|Details | Review|
Don't use BeginWriting() to write past the logical length of a string in XHR. See bug 1484668 for details.
The old code assumes that it's OK to use nsAString::BeginWriting() to write past the string's logical length if the string has enough capacity. This is bogus, because the string doesn't know of data written past its logical length. The BulkWrite API has been created precisely for this purpose and allows orderly capacity-aware low-level writes to the string. MozReview-Commit-ID: BYQHl8Z9Fbd
Comment on attachment 9002756 [details] Bug 1484990 - Use BulkWrite instead of write past length via BeginWriting() in XHR. Andrea Marchesini [:baku] has approved the revision.
Attachment #9002756 - Flags: review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/510decfb443d Use BulkWrite instead of write past length via BeginWriting() in XHR. r=baku
Backed out for braking many test suites e.g. Wr Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=510decfb443d585f9913e12227764fecaad5ea8d *** you can see all failures from other test suites in the above link. Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=196388469&repo=autoland&lineNumber=1089 Backout: https://hg.mozilla.org/integration/autoland/rev/618546b5d4416f83f18aa64f556bfa7584bb7be7
Weird. Previous iterations of this patch did fine on try. I guess I should always send every iteration to try. :-(
Try run with revised patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f20ff2a70697739211e23829e4bce8650e9fd722
Another try run with a different base to see if the failures of the previous try run were due to other patches that got backed out: https://treeherder.mozilla.org/#/jobs?repo=try&revision=034339ff235af1d2d723115e0a43ae5a32896801
Yet another try run, hopefully with a less orange base revision: https://treeherder.mozilla.org/#/jobs?repo=try&revision=295c914e88701fa45466817a60bcc13f8a02cb90
Only known oranges on try!
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/47f6709be61f Use BulkWrite instead of write past length via BeginWriting() in XHR. r=baku
You need to log in before you can comment on or make changes to this bug.