Bug 125706

Summary: mandreel throws a checksum error on 32-bit x86
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, mark.lam, mhahnenberg, mmirman, msaboff, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch. fpizlo: review+

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
<rdar://problem/15659804>
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>.