<?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>156343</bug_id>
          
          <creation_ts>2016-04-07 08:59:30 -0700</creation_ts>
          <short_desc>[Win] Fix for JSC stress test failures.</short_desc>
          <delta_ts>2016-04-07 10:39:55 -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>WebKit 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>peavo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1181689</commentid>
    <comment_count>0</comment_count>
    <who name="">peavo</who>
    <bug_when>2016-04-07 08:59:30 -0700</bug_when>
    <thetext>We need to make it clear to MSVC that the method loadPtr(ImplicitAddress address, RegisterID dest) should be used, and not loadPtr(const void* address, RegisterID dest).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181692</commentid>
    <comment_count>1</comment_count>
      <attachid>275891</attachid>
    <who name="">peavo</who>
    <bug_when>2016-04-07 09:03:56 -0700</bug_when>
    <thetext>Created attachment 275891
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181693</commentid>
    <comment_count>2</comment_count>
      <attachid>275891</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-04-07 09:10:48 -0700</bug_when>
    <thetext>Comment on attachment 275891
Patch

This seems to be used a few other places, but I don&apos;t understand how a GPRInfo is being interpreted as a void*.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181695</commentid>
    <comment_count>3</comment_count>
      <attachid>275891</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-04-07 09:21:01 -0700</bug_when>
    <thetext>Comment on attachment 275891
Patch

Wow, crazy!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181716</commentid>
    <comment_count>4</comment_count>
    <who name="">peavo</who>
    <bug_when>2016-04-07 10:31:34 -0700</bug_when>
    <thetext>Thanks for reviewing :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181720</commentid>
    <comment_count>5</comment_count>
    <who name="">peavo</who>
    <bug_when>2016-04-07 10:33:32 -0700</bug_when>
    <thetext>Committed r199160: &lt;http://trac.webkit.org/changeset/199160&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1181722</commentid>
    <comment_count>6</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2016-04-07 10:39:55 -0700</bug_when>
    <thetext>By the way: the fact that load and friends take const void* instead of AbsoluteAddress and they take GPRReg instead of Address (via the weird ImplicitAddress thing) is a vestige of a past long gone.

It would be super cool to replace all cases of the assembler taking void* and change them to take AbsoluteAddress.  It would also be cool to get rid of ImplicitAddress and make everyone use Address.

It&apos;s not obvious why MSVC interpreted the code the way that it did, but I can sort of see it, and it&apos;s scary to think just how much our load() and store() methods rely on very specific interpretations of overload resolution to work properly.  A RegisterID/GPRReg is just an enum, which coerces to int, and regT0 is a zero-valued enum.  We want MSVC to realize that the preferred overload resolution is to coerce to ImplicitAddress, but apparently due to the zeroish nature of regT0, it&apos;s treating it as null-like and coercing to void*.  Whether that&apos;s right or wrong, I don&apos;t really care, because I don&apos;t like it when the correctness of code relies so much on C++&apos;s arcane overload resolution rules.  Therefore, I think that this change is a big win for correctness, and I think we should use Address() explicitly in more places.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>275891</attachid>
            <date>2016-04-07 09:03:56 -0700</date>
            <delta_ts>2016-04-07 09:21:01 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-156343-20160407180410.patch</filename>
            <type>text/plain</type>
            <size>2049</size>
            <attacher>peavo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTk5MTU2KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBA
CisyMDE2LTA0LTA3ICBQZXIgQXJuZSBWb2xsYW4gIDxwZWF2b0BvdXRsb29rLmNvbT4KKworICAg
ICAgICBbV2luXSBGaXggZm9yIEpTQyBzdHJlc3MgdGVzdCBmYWlsdXJlcy4KKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE1NjM0MworCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFdlIG5lZWQgdG8gbWFrZSBpdCBj
bGVhciB0byBNU1ZDIHRoYXQgdGhlIG1ldGhvZCBsb2FkUHRyKEltcGxpY2l0QWRkcmVzcyBhZGRy
ZXNzLCBSZWdpc3Rlckl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JJbmZvOjpyZWdUMCksIEdQUkluZm86OnJlZ1QxKTsKICAgICBK
dW1wIG9rID0gYnJhbmNoUHRyKEJlbG93LCBHUFJJbmZvOjpyZWdUMSwgVHJ1c3RlZEltbVB0cih2
bSgpLT5zaGFkb3dDaGlja2VuKCkubG9nRW5kKCkpKTsKICAgICBzZXR1cEFyZ3VtZW50c0V4ZWNT
dGF0ZSgpOwogICAgIG1vdmUoVHJ1c3RlZEltbVB0cihiaXR3aXNlX2Nhc3Q8dm9pZCo+KG9wZXJh
dGlvblByb2Nlc3NTaGFkb3dDaGlja2VuTG9nKSksIEdQUkluZm86Om5vbkFyZ0dQUjApOwogICAg
IGNhbGwoR1BSSW5mbzo6bm9uQXJnR1BSMCk7CiAgICAgbW92ZShUcnVzdGVkSW1tUHRyKHZtKCkt
PnNoYWRvd0NoaWNrZW4oKS5hZGRyZXNzT2ZMb2dDdXJzb3IoKSksIEdQUkluZm86OnJlZ1QwKTsK
LSAgICBsb2FkUHRyKEdQUkluZm86OnJlZ1QwLCBHUFJJbmZvOjpyZWdUMSk7CisgICAgbG9hZFB0
cihBZGRyZXNzKEdQUkluZm86OnJlZ1QwKSwgR1BSSW5mbzo6cmVnVDEpOwogICAgIG9rLmxpbmso
dGhpcyk7CiAgICAgYWRkUHRyKFRydXN0ZWRJbW0zMihzaXplb2YoU2hhZG93Q2hpY2tlbjo6UGFj
a2V0KSksIEdQUkluZm86OnJlZ1QxLCBHUFJJbmZvOjpyZWdUMik7Ci0gICAgc3RvcmVQdHIoR1BS
SW5mbzo6cmVnVDIsIEdQUkluZm86OnJlZ1QwKTsKKyAgICBzdG9yZVB0cihHUFJJbmZvOjpyZWdU
MiwgQWRkcmVzcyhHUFJJbmZvOjpyZWdUMCkpOwogfQogCiB9IC8vIG5hbWVzcGFjZSBKU0MK
</data>
<flag name="review"
          id="300185"
          type_id="1"
          status="+"
          setter="fpizlo"
    />
          </attachment>
      

    </bug>

</bugzilla>