Bug 26600 - StringImpl::copy() no longer copies empty string correctly
Summary: StringImpl::copy() no longer copies empty string correctly
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Critical
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2009-06-22 00:54 PDT by Alexey Proskuryakov
Modified: 2009-06-25 21:27 PDT (History)
2 users (show)

See Also:

proposed fix (1.63 KB, patch)
2009-06-22 12:11 PDT, Alexey Proskuryakov
levin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2009-06-22 00:54:30 PDT
StringImpl::copy() should not ever return per-thread empty string, because this function's result is for using on other threads.

This was broken in <http://trac.webkit.org/changeset/41917> - StringImpl::create() has a special case for empty strings, so calling it is not appropriate.
Comment 1 Alexey Proskuryakov 2009-06-22 12:11:52 PDT
Created attachment 31663 [details]
proposed fix
Comment 2 Alexey Proskuryakov 2009-06-22 13:14:51 PDT
Committed revision 44952.

Comment 3 Alexey Proskuryakov 2009-06-25 21:27:02 PDT
See <rdar://6964477> and its duplicates.