Bug 125706 - mandreel throws a checksum error on 32-bit x86
Summary: mandreel throws a checksum error on 32-bit x86
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
Depends on:
Reported: 2013-12-13 13:14 PST by Mark Hahnenberg
Modified: 2014-03-28 17:38 PDT (History)
7 users (show)

See Also:

the patch. (5.00 KB, patch)
2014-03-28 16:59 PDT, Mark Lam
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2013-12-13 13:14:36 PST
Steps to repro:

(1) Tools/Scripts/build-jsc --debug --32-bit
(2) Edit run.js to only load base.js and mandreel.js
(2) DYLD_FRAMEWORK_PATH=/Volumes/Data/WebKit-svn-clean/OpenSource/WebKitBuild/Debug/ /Volumes/Data/WebKit-svn-clean/OpenSource/WebKitBuild/Debug/jsc run.js
(3) Observe the following error message:

Exception: Alert called with argument: Check sum mismatch: expected ???, actual 7649662
Comment 1 Mark Hahnenberg 2013-12-13 13:39:08 PST
Comment 2 Mark Lam 2014-03-28 16:41:11 PDT
The issue is due to the 32-bit DFG emitting code that load constants from its CodeBlock's m_constantRegisters vector, and then resizing that vector thereby rendering the addresses in the emitted code state.  The fix is to use a dedicated doubles constant pool for the DFG stored in the DFG CommonData.
Comment 3 Mark Lam 2014-03-28 16:59:17 PDT
Created attachment 228094 [details]
the patch.
Comment 4 Mark Lam 2014-03-28 17:38:42 PDT
Thanks.  Landed in r166440: <http://trac.webkit.org/r166440>.