Bug 159710 - Test WTF.StringViewIterators is crashing since r203119
Summary: Test WTF.StringViewIterators is crashing since r203119
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-13 03:53 PDT by Carlos Garcia Campos
Modified: 2016-07-13 23:18 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.56 KB, patch)
2016-07-13 03:55 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2016-07-13 03:53:35 PDT
I think there are two problems in the test case added in r203119. First is that it's testing StringView::CodeUnits::Iterator instead of StringView::CodePoints::Iterator, and second is that StringView::codePoints() returns a temporary, so the iterator created from the temporary ends up pointing to a const reference to the string view member of the deleted CodePoints object.
Comment 1 Carlos Garcia Campos 2016-07-13 03:55:05 PDT
Created attachment 283508 [details]
Patch
Comment 2 Myles C. Maxfield 2016-07-13 12:16:59 PDT
Wow... whoops. Thanks so much for fixing this.
Comment 3 Carlos Garcia Campos 2016-07-13 23:18:31 PDT
Committed r203214: <http://trac.webkit.org/changeset/203214>