Fix alignment issue causing crash in QtScript/JavaScriptCore
authorKent Hansen <kent.hansen@nokia.com>
Thu, 27 Jan 2011 15:29:52 +0000 (16:29 +0100)
committerJason McDonald <jason.mcdonald@nokia.com>
Mon, 31 Jan 2011 13:00:19 +0000 (23:00 +1000)
commitc403773accc3b3e9d90df54663efa6f5ff116bee
treebd6d015debdd0ed939966ed7c944c94a0bae5652
parent80301d80b35715ae6446a152f7d4002d1f04724c
Fix alignment issue causing crash in QtScript/JavaScriptCore

When creating a substring, JSC::UStringImpl required that the
base string pointer was 8-byte aligned. However, on platforms
where FastMalloc isn't enabled (such as Symbian), it's possible
that the system malloc() returns a pointer that is only 4-byte
aligned. (On Symbian, this can happen if the argument to malloc()
itself isn't a multiple of 8.)

Cherry-picked http://trac.webkit.org/changeset/54743 from WebKit
trunk, which fixes this issue. (The commit happened shortly after
we rebased QtScript/JSC for 4.7, so it applies cleanly to our copy.)

Task-number: QTBUG-16828
Reviewed-by: Simon Hausmann
(cherry picked from commit ead20f4c1edc2e1c5c39f47bf7c9e56600d6362b)
src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.h
src/3rdparty/javascriptcore/VERSION