<?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>131508</bug_id>
          
          <creation_ts>2014-04-10 14:16:55 -0700</creation_ts>
          <short_desc>win64 build fix</short_desc>
          <delta_ts>2014-04-14 07:20:27 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Christensen">alex.christensen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>999648</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Christensen">alex.christensen</who>
    <bug_when>2014-04-10 14:16:55 -0700</bug_when>
    <thetext>In 64-bit Windows, &quot;unsigned&quot; means a 32-bit unsigned integer, &quot;size_t&quot; means a 64-bit unsigned integer, and &quot;unsigned long&quot; means a 32-bit unsigned integer.  Visual Studio is having trouble deciding whether to use std::min&lt;unsigned&gt; or std::min&lt;size_t&gt; in X86Assembler.h.  Here&apos;s a simple fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999650</commentid>
    <comment_count>1</comment_count>
      <attachid>229080</attachid>
    <who name="Alex Christensen">alex.christensen</who>
    <bug_when>2014-04-10 14:19:47 -0700</bug_when>
    <thetext>Created attachment 229080
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999744</commentid>
    <comment_count>2</comment_count>
      <attachid>229080</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-10 18:46:26 -0700</bug_when>
    <thetext>Comment on attachment 229080
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999749</commentid>
    <comment_count>3</comment_count>
      <attachid>229080</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-04-10 19:18:03 -0700</bug_when>
    <thetext>Comment on attachment 229080
Patch

Clearing flags on attachment: 229080

Committed r167108: &lt;http://trac.webkit.org/changeset/167108&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999750</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-04-10 19:18:06 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1000202</commentid>
    <comment_count>5</comment_count>
      <attachid>229080</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-04-12 11:58:18 -0700</bug_when>
    <thetext>Comment on attachment 229080
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=229080&amp;action=review

&gt; Source/JavaScriptCore/assembler/X86Assembler.h:2276
&gt; -            unsigned nopSize = std::min(size, 15UL);
&gt; +            unsigned nopSize = std::min&lt;unsigned&gt;(size, 15UL);

Once we add &lt;unsigned&gt;, then there is no point in having the UL there any more. The L is particularly silly, since it gives us an unsigned long constant for no good reason.

Also, this function won’t work for any sizes that are greater than the maximum unsigned. It probably should either take an argument of type unsigned or work properly for large values of type size_t. Taking a size_t, and malfunctioning, seems like a strange choice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1000241</commentid>
    <comment_count>6</comment_count>
    <who name="Alex Christensen">alex.christensen</who>
    <bug_when>2014-04-12 18:37:07 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Also, this function won’t work for any sizes that are greater than the maximum unsigned. It probably should either take an argument of type unsigned or work properly for large values of type size_t. Taking a size_t, and malfunctioning, seems like a strange choice.
I was shooting for a non-invasive fix, and I was assuming that size wouldn&apos;t get anywhere near ULONG_MAX.  Do you think it would be worth switching all the unsigned types to size_t?  I&apos;m a big fan of using size_t unless a different type is needed, but I also don&apos;t work on JavaScriptCore much and don&apos;t want to muck up their code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1000478</commentid>
    <comment_count>7</comment_count>
    <who name="Alex Christensen">alex.christensen</who>
    <bug_when>2014-04-14 07:20:27 -0700</bug_when>
    <thetext>You&apos;re right, Darin.  A fix is in https://bugs.webkit.org/show_bug.cgi?id=131615</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>229080</attachid>
            <date>2014-04-10 14:19:47 -0700</date>
            <delta_ts>2014-04-12 11:58:18 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-131508-20140410151931.patch</filename>
            <type>text/plain</type>
            <size>1382</size>
            <attacher name="Alex Christensen">alex.christensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTY3MDg2KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE0IEBA
CisyMDE0LTA0LTEwICBBbGV4IENocmlzdGVuc2VuICA8YWNocmlzdGVuc2VuQHdlYmtpdC5vcmc+
CisKKyAgICAgICAgQ29tcGlsZSB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gICAgICAgdW5zaWduZWQgbm9wU2l6ZSA9IHN0ZDo6
bWluKHNpemUsIDE1VUwpOworICAgICAgICAgICAgdW5zaWduZWQgbm9wU2l6ZSA9IHN0ZDo6bWlu
PHVuc2lnbmVkPihzaXplLCAxNVVMKTsKICAgICAgICAgICAgIHVuc2lnbmVkIG51bVByZWZpeGVz
ID0gbm9wU2l6ZSA8PSAxMCA/IDAgOiBub3BTaXplIC0gMTA7CiAgICAgICAgICAgICBmb3IgKHVu
c2lnbmVkIGkgPSAwOyBpICE9IG51bVByZWZpeGVzOyArK2kpCiAgICAgICAgICAgICAgICAgKndo
ZXJlKysgPSAweDY2Owo=
</data>

          </attachment>
      

    </bug>

</bugzilla>