<?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>173573</bug_id>
          
          <creation_ts>2017-06-19 18:12:54 -0700</creation_ts>
          <short_desc>repatchIn needs to lock the CodeBlock&apos;s lock</short_desc>
          <delta_ts>2017-06-20 00:15:23 -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 name="Saam Barati">saam</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>gskachkov</cc>
    
    <cc>jfbastien</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>ticaiolima</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1320913</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2017-06-19 18:12:54 -0700</bug_when>
    <thetext>...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1320924</commentid>
    <comment_count>1</comment_count>
      <attachid>313348</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2017-06-19 18:50:29 -0700</bug_when>
    <thetext>Created attachment 313348
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1320930</commentid>
    <comment_count>2</comment_count>
      <attachid>313348</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-06-19 19:03:49 -0700</bug_when>
    <thetext>Comment on attachment 313348
patch

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

r=me

&gt; Source/JavaScriptCore/jit/Repatch.cpp:560
&gt;      if (tryRepatchIn(exec, base, ident, wasFound, slot, stubInfo) == GiveUpOnCache)
&gt;          ftlThunkAwareRepatchCall(exec-&gt;codeBlock(), stubInfo.slowPathCallLocation(), operationIn);

BTW, how about passing the lock to these repatch functions? (const AbstractLocker&amp;). Of course, it should be done in a separate patch b/c it involves other Get/Put changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1321021</commentid>
    <comment_count>3</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2017-06-19 23:46:43 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #2)
&gt; Comment on attachment 313348 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=313348&amp;action=review
&gt; 
&gt; r=me
&gt; 
&gt; &gt; Source/JavaScriptCore/jit/Repatch.cpp:560
&gt; &gt;      if (tryRepatchIn(exec, base, ident, wasFound, slot, stubInfo) == GiveUpOnCache)
&gt; &gt;          ftlThunkAwareRepatchCall(exec-&gt;codeBlock(), stubInfo.slowPathCallLocation(), operationIn);
&gt; 
&gt; BTW, how about passing the lock to these repatch functions? (const
&gt; AbstractLocker&amp;). Of course, it should be done in a separate patch b/c it
&gt; involves other Get/Put changes.

Yup I’ll make a patch to do this. It took me a bit before I realized which functions were grabbing the lock. It’s not obvious that it’s held from some places.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1321030</commentid>
    <comment_count>4</comment_count>
      <attachid>313348</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-06-20 00:15:22 -0700</bug_when>
    <thetext>Comment on attachment 313348
patch

Clearing flags on attachment: 313348

Committed r218552: &lt;http://trac.webkit.org/changeset/218552&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1321031</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-06-20 00:15:23 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>313348</attachid>
            <date>2017-06-19 18:50:29 -0700</date>
            <delta_ts>2017-06-20 00:15:22 -0700</delta_ts>
            <desc>patch</desc>
            <filename>b-backup.diff</filename>
            <type>text/plain</type>
            <size>1753</size>
            <attacher name="Saam Barati">saam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMjE4NTIwKQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIwIEBA
CisyMDE3LTA2LTE5ICBTYWFtIEJhcmF0aSAgPHNiYXJhdGlAYXBwbGUuY29tPgorCisgICAgICAg
IHJlcGF0Y2hJbiBuZWVkcyB0byBsb2NrIHRoZSBDb2RlQmxvY2sncyBsb2NrCisgICAgICAgIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNzM1NzMKKworICAgICAgICBS
ZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBDb2RlQmxvY2s6OnBy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jcHAJKHJldmlzaW9uIDIxODUyMCkKKysrIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9qaXQvUmVw
YXRjaC5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTU1NSw2ICs1NTUsNyBAQCB2b2lkIHJlcGF0Y2hJ
bigKICAgICBjb25zdCBQcm9wZXJ0eVNsb3QmIHNsb3QsIFN0cnVjdHVyZVN0dWJJbmZvJiBzdHVi
SW5mbykKIHsKICAgICBTdXBlclNhbXBsZXJTY29wZSBzdXBlclNhbXBsZXJTY29wZShmYWxzZSk7
CisgICAgR0NTYWZlQ29uY3VycmVudEpTTG9ja2VyIGxvY2tlcihleGVjLT5jb2RlQmxvY2soKS0+
bV9sb2NrLCBleGVjLT52bSgpLmhlYXApOwogICAgIGlmICh0cnlSZXBhdGNoSW4oZXhlYywgYmFz
ZSwgaWRlbnQsIHdhc0ZvdW5kLCBzbG90LCBzdHViSW5mbykgPT0gR2l2ZVVwT25DYWNoZSkKICAg
ICAgICAgZnRsVGh1bmtBd2FyZVJlcGF0Y2hDYWxsKGV4ZWMtPmNvZGVCbG9jaygpLCBzdHViSW5m
by5zbG93UGF0aENhbGxMb2NhdGlvbigpLCBvcGVyYXRpb25Jbik7CiB9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>