<?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>175772</bug_id>
          
          <creation_ts>2017-08-21 09:17:34 -0700</creation_ts>
          <short_desc>[Win][Release] Crash when running testmasm executable.</short_desc>
          <delta_ts>2017-08-22 08:51: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>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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>buildbot</cc>
    
    <cc>commit-queue</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1340612</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-08-21 09:17:34 -0700</bug_when>
    <thetext>I believe we need to save and restore the modified registers in case one or more registers are callee saved on the relevant platforms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1340616</commentid>
    <comment_count>1</comment_count>
      <attachid>318637</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-08-21 09:19:51 -0700</bug_when>
    <thetext>Created attachment 318637
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1340762</commentid>
    <comment_count>2</comment_count>
      <attachid>318637</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-08-21 14:40:08 -0700</bug_when>
    <thetext>Comment on attachment 318637
Patch

Let&apos;s definitely just do this for win64, which has this as a requirement in its calling convention, and not for every platform.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1340959</commentid>
    <comment_count>3</comment_count>
      <attachid>318637</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2017-08-21 22:19:13 -0700</bug_when>
    <thetext>Comment on attachment 318637
Patch

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

r=me

&gt; Source/JavaScriptCore/ChangeLog:9
&gt; +        We need to save and restore the modified registers in case one or more registers are callee saved
&gt; +        on the relevant platforms.

When I wrote the tests, I chose argument registers on purpose because I thought they would not be callee saved registers.  Of course, I forgot that 32-bit x86 does not actually pass arguments in registers, and it turns out that argumentGPR3 is ebx, which is a callee saved register.

I think it doesn&apos;t hurt to do what you&apos;re doing with pushing and popping the argument registers for all platforms.  It makes the test agnostic of whether the target platform treats any of the registers as callee saved or not, and therefore, is more robust in a self-contained way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1340960</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2017-08-21 22:21:07 -0700</bug_when>
    <thetext>(In reply to Alex Christensen from comment #2)
&gt; Comment on attachment 318637 [details]
&gt; Patch
&gt; 
&gt; Let&apos;s definitely just do this for win64, which has this as a requirement in
&gt; its calling convention, and not for every platform.

Actually, this only needed for win32.  However, I think it doesn&apos;t hurt to make the test more robust and agnostic of platform details as to whether those registers are callee saved or not.  The test really doesn&apos;t care about that detail.  It only wants to set some register values for test.  So, I think we should go forward with this fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1341054</commentid>
    <comment_count>5</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-08-22 08:22:22 -0700</bug_when>
    <thetext>(In reply to Mark Lam from comment #4)
&gt; (In reply to Alex Christensen from comment #2)
&gt; &gt; Comment on attachment 318637 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; Let&apos;s definitely just do this for win64, which has this as a requirement in
&gt; &gt; its calling convention, and not for every platform.
&gt; 
&gt; Actually, this only needed for win32.  However, I think it doesn&apos;t hurt to
&gt; make the test more robust and agnostic of platform details as to whether
&gt; those registers are callee saved or not.  The test really doesn&apos;t care about
&gt; that detail.  It only wants to set some register values for test.  So, I
&gt; think we should go forward with this fix.

Thanks for reviewing, all!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1341061</commentid>
    <comment_count>6</comment_count>
      <attachid>318637</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-08-22 08:50:54 -0700</bug_when>
    <thetext>Comment on attachment 318637
Patch

Clearing flags on attachment: 318637

Committed r221012: &lt;http://trac.webkit.org/changeset/221012&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1341062</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-08-22 08:50:56 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1341063</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-08-22 08:51:32 -0700</bug_when>
    <thetext>&lt;rdar://problem/34013544&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>318637</attachid>
            <date>2017-08-21 09:19:51 -0700</date>
            <delta_ts>2017-08-22 08:50:54 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-175772-20170821181950.patch</filename>
            <type>text/plain</type>
            <size>2910</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMjIwOTY1KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBA
CisyMDE3LTA4LTIxICBQZXIgQXJuZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNvbT4KKworICAg
ICAgICBbV2luXVtSZWxlYXNlXSBDcmFzaCB3aGVuIHJ1bm5pbmcgdGVzdG1hc20gZXhlY3V0YWJs
ZS4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE3NTc3
MgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFdlIG5l
ZWQgdG8gc2F2ZSBhbmQgcmVzdG9yZSB0aGUgbW9kaWZpZWQgcmVnaXN0ZXJzIGluIGNhc2Ugb25l
IG9yIG1vcmUgcmVnaXN0ZXJzIGFyZSBjYWxsZWUgc2F2ZWQKKyAgICAgICAgb24gdGhlIHJlbGV2
YW50IHBsYXRmb3Jtcy4KKworICAgICAgICAqIGFzc2VtYmxlci90ZXN0bWFzbS5jcHA6CisgICAg
ICAgIChKU0M6OnRlc3RQcm9iZVJlYWRzQXJndW1lbnRSZWdpc3RlcnMpOgorICAgICAgICAoSlND
Ojp0ZXN0UHJvYmVXcml0ZXNBcmd1bWVudFJlZ2lzdGVycyk6CisKIDIwMTctMDgtMjAgIE1hcmsg
TGFtICA8bWFyay5sYW1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GlhbGl6ZSB3aXRoIG5vbi1leHBlY3RlZCB2YWx1ZXMuCiAjaWYgVVNFKEpTVkFMVUU2
NCkKICAgICAgICAgaml0Lm1vdmUoQ0NhbGxIZWxwZXJzOjpUcnVzdGVkSW1tNjQoMCksIEdQUklu
Zm86OmFyZ3VtZW50R1BSMCk7CkBAIC0yNTEsNiArMjY3LDExIEBAIHZvaWQgdGVzdFByb2JlV3Jp
dGVzQXJndW1lbnRSZWdpc3RlcnMoKQogICAgICAgICAgICAgQ0hFQ0tfRVEoY3B1LmZwcjx1aW50
NjRfdD4oRlBSSW5mbzo6ZnBSZWdUMSksIHRlc3RXb3JkNjQoMSkpOwogICAgICAgICB9KTsKIAor
ICAgICAgICBqaXQucG9wKEdQUkluZm86OmFyZ3VtZW50R1BSMyk7CisgICAgICAgIGppdC5wb3Ao
R1BSSW5mbzo6YXJndW1lbnRHUFIyKTsKKyAgICAgICAgaml0LnBvcChHUFJJbmZvOjphcmd1bWVu
dEdQUjEpOworICAgICAgICBqaXQucG9wKEdQUkluZm86OmFyZ3VtZW50R1BSMCk7CisKICAgICAg
ICAgaml0LmVtaXRGdW5jdGlvbkVwaWxvZ3VlKCk7CiAgICAgICAgIGppdC5yZXQoKTsKICAgICB9
KTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>