<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>38747</bug_id>
          
          <creation_ts>2010-05-07 07:15:20 -0700</creation_ts>
          <short_desc>mingw-w64 and JIT support</short_desc>
          <delta_ts>2010-05-11 03:22:32 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>35784</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter>vanboxem.ruben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>aroben</cc>
    
    <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>eric</cc>
    
    <cc>hausmann</cc>
    
    <cc>kenneth</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>loki</cc>
    
    <cc>ossy</cc>
    
    <cc>vanboxem.ruben</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>222347</commentid>
    <comment_count>0</comment_count>
    <who name="">vanboxem.ruben</who>
    <bug_when>2010-05-07 07:15:20 -0700</bug_when>
    <thetext>Since the recently landed patches for bug https://bugs.webkit.org/show_bug.cgi?id=35607 (which have been introduced in QtWebkit as well), I have stumbled upon a serious issue with mingw-w64 and enabled JIT.

The above patches (see bug report) enable JIT for a X86_64 Windows when using mingw-w64. This was a mistake, as even MSVC x64 builds don&apos;t enable it and the JIT crashes any webkit program using the build. Without it, everything is perfectly fine.

I&apos;m sorry I didn&apos;t upload a patch, but there are only two lines to be removed (line 943-944 (trunk) of JavaScriptCore/wtf/Platform.h, those enabling JIT on the x64 Windows builds with mingw-w64).

It would of course be better to fix JIT on Win64, but I am in no position (knowledge or otherwise) to do so, and I&apos;m leaving that to more experienced people.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>222350</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2010-05-07 07:20:44 -0700</bug_when>
    <thetext>Thanks for adding me in CC. This is blocking for QtWebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223015</commentid>
    <comment_count>2</comment_count>
    <who name="">vanboxem.ruben</who>
    <bug_when>2010-05-09 02:15:11 -0700</bug_when>
    <thetext>Any chance this could still be pushed to 4.7 before release?

The true fixing for Win64 JIT can come later...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223044</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-05-09 09:14:54 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Any chance this could still be pushed to 4.7 before release?
&gt; 
&gt; The true fixing for Win64 JIT can come later...

It is already blocking on the release bug, so we will have to look at this before the release, yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223068</commentid>
    <comment_count>4</comment_count>
      <attachid>55509</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2010-05-09 13:59:36 -0700</bug_when>
    <thetext>Created attachment 55509
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223070</commentid>
    <comment_count>5</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2010-05-09 14:01:31 -0700</bug_when>
    <thetext>Gabor, any idea what is involved actually fixing JIT for MINGW64 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223137</commentid>
    <comment_count>6</comment_count>
      <attachid>55509</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-05-09 19:25:19 -0700</bug_when>
    <thetext>Comment on attachment 55509
proposed patch

Seems OK, rs=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223161</commentid>
    <comment_count>7</comment_count>
    <who name="Gabor Loki">loki</who>
    <bug_when>2010-05-09 23:20:14 -0700</bug_when>
    <thetext>At first I do not see why it is not working. JSValue64 is enabled, JIT stubs routines are there for GCC. There&apos;s nothing missing here. I am going to ask Ossy or someone else to reproduce the error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223269</commentid>
    <comment_count>8</comment_count>
      <attachid>55509</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-05-10 06:07:41 -0700</bug_when>
    <thetext>Comment on attachment 55509
proposed patch

Clearing flags on attachment: 55509

Committed r59074: &lt;http://trac.webkit.org/changeset/59074&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223270</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-05-10 06:07:49 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223277</commentid>
    <comment_count>10</comment_count>
    <who name="Gabor Loki">loki</who>
    <bug_when>2010-05-10 06:23:19 -0700</bug_when>
    <thetext>Unfortunately, we were not able to build QtWebKit with mingw-w64. It would be nice if someone writes a &quot;works-for-me&quot; section for mingw-w64 at http://trac.webkit.org/wiki/BuildingQtOnWindows wiki. Apart from that, no other magic should be needed to fire JIT up with mingw-w64.
In additional, the x86_64 based QtWebKit runs fine on linux, see at http://www.sed.hu/webkit/qtbuildbot/builders/x86-64%20Linux%20Qt%20Release. It is red, but the JIT runs (only 3 layout tests fail).
The JIT only has the following OS dependent sections: memory allocation, make a mem. range executable, flush a mem. region on some targets, and the function call abi (nothing else). So if this problem is not related to mingw-w64 compiler, the bug should be in ExecutableAllocator or JITStubs (or maybe in privateCompileCTIMachineTrampolines), but they look nice.
Well, a good back-trace is essential for efficient debugging. ;) Could someone make a detailed bug report for mingw-w64 JIT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223283</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-05-10 06:37:59 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/59074 might have broken Qt Linux ARMv5 Release</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223291</commentid>
    <comment_count>12</comment_count>
    <who name="">vanboxem.ruben</who>
    <bug_when>2010-05-10 06:50:39 -0700</bug_when>
    <thetext>By popular demand:

https://trac.webkit.org/wiki/BuildingQtOnWindows#AWorksForMeStep-by-StepGuidetobuildingQtWebKitonWindowsusingmingw-w64w32

If it doesn&apos;t work, please say so, then I may have missed a step...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223848</commentid>
    <comment_count>13</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-05-11 03:22:18 -0700</bug_when>
    <thetext>Revision r59074 cherry-picked into qtwebkit-2.0 with commit dc5821c3df2ef60456d85263160852f5335cf946</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>55509</attachid>
            <date>2010-05-09 13:59:36 -0700</date>
            <delta_ts>2010-05-10 06:07:40 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>38747.patch</filename>
            <type>text/plain</type>
            <size>1306</size>
            <attacher name="Laszlo Gombos">laszlo.gombos</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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mtpdC5vcmcvc2gKICNlbGlmIENQVShYODYpICYmIE9TKFdJTkRPV1MpICYmIENPTVBJTEVS
KE1JTkdXKSAmJiBHQ0NfVkVSU0lPTiA+PSA0MDEwMAogICAgICNkZWZpbmUgRU5BQkxFX0pJVCAx
CiAgICAgI2RlZmluZSBXVEZfVVNFX0pJVF9TVFVCX0FSR1VNRU5UX1ZBX0xJU1QgMQotI2VsaWYg
Q1BVKFg4Nl82NCkgJiYgT1MoV0lORE9XUykgJiYgQ09NUElMRVIoTUlOR1c2NCkgJiYgR0NDX1ZF
UlNJT04gPj0gNDAxMDAKLSAgICAjZGVmaW5lIEVOQUJMRV9KSVQgMQogI2VsaWYgQ1BVKFg4Nikg
JiYgT1MoV0lORE9XUykgJiYgQ09NUElMRVIoTVNWQykKICAgICAjZGVmaW5lIEVOQUJMRV9KSVQg
MQogICAgICNkZWZpbmUgV1RGX1VTRV9KSVRfU1RVQl9BUkdVTUVOVF9SRUdJU1RFUiAxCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>