<?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>55156</bug_id>
          
          <creation_ts>2011-02-24 09:23:58 -0800</creation_ts>
          <short_desc>PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()</short_desc>
          <delta_ts>2011-02-24 15:59:25 -0800</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>PC</rep_platform>
          <op_sys>OS X 10.5</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="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>357087</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-02-24 09:23:58 -0800</bug_when>
    <thetext>The removal of empty disjunction alternatives from the alternatives vector doesn&apos;t delete the removed alternative thus leaking it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357178</commentid>
    <comment_count>1</comment_count>
      <attachid>83682</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-02-24 11:06:30 -0800</bug_when>
    <thetext>Created attachment 83682
Patch to delete unneeded PatternAlternative</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357185</commentid>
    <comment_count>2</comment_count>
      <attachid>83682</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2011-02-24 11:19:23 -0800</bug_when>
    <thetext>Comment on attachment 83682
Patch to delete unneeded PatternAlternative

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357193</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-02-24 11:25:56 -0800</bug_when>
    <thetext>Committed r79594: &lt;http://trac.webkit.org/changeset/79594&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357242</commentid>
    <comment_count>4</comment_count>
      <attachid>83682</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-02-24 11:58:14 -0800</bug_when>
    <thetext>Comment on attachment 83682
Patch to delete unneeded PatternAlternative

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

&gt; Source/JavaScriptCore/yarr/YarrPattern.cpp:500
&gt; +                PatternAlternative* altToRemove = parenthesesDisjunction-&gt;m_alternatives[i];
&gt;                  parenthesesDisjunction-&gt;m_alternatives.remove(i);
&gt; +                delete altToRemove;

A couple post-patch-lading thoughts:

I would prefer to do this with OwnPtr instead of an explicit delete. Maybe m_alternatives could actually use OwnPtr.

I would also have called it alternativeToRemove instead of altToRemove.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>357511</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-02-24 15:59:25 -0800</bug_when>
    <thetext>http://trac.webkit.org/changeset/79594 might have broken GTK Linux 32-bit Release</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>83682</attachid>
            <date>2011-02-24 11:06:30 -0800</date>
            <delta_ts>2011-02-24 11:58:14 -0800</delta_ts>
            <desc>Patch to delete unneeded PatternAlternative</desc>
            <filename>55156.patch</filename>
            <type>text/plain</type>
            <size>1495</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gNzk1OTEpCisrKyBTb3VyY2Uv
SmF2YVNjcmlwdENvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTYgQEAK
KzIwMTEtMDItMjQgIE1pY2hhZWwgU2Fib2ZmICA8bXNhYm9mZkBhcHBsZS5jb20+CisKKyAgICAg
ICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgUGF0dGVybkFsdGVybmF0
aXZlIGxlYWtlZCBpbiBZYXJyUGF0dGVybkNvbnN0cnVjdG9yOjphdG9tUGFyZW50aGVzZXNFbmQo
KQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NTUxNTYK
KworICAgICAgICBBZGRlZCBjb2RlIHRvIGRlbGV0ZSB1bm5lZWRlZCBQYXR0ZXJuQWx0ZXJuYXRp
dmUgYWZ0ZXIgaXQgaXMgcmVtb3ZlZAorICAgICAgICBmcm9tIG1fYWx0ZXJuYXRpdmVzIFZlY3Rv
ci4KKworICAgICAgICAqIHlhcnIvWWFyclBhdHRlcm4uY3BwOgorICAgICAgICAoSlNDOjpZYXJy
OjpZYXJyUGF0dGVybkNvbnN0cnVjdG9yOjphdG9tUGFyZW50aGVzZXNFbmQpOgorCiAyMDExLTAy
LTI0ICBFcmljIFNlaWRlbCAgPGVyaWNAd2Via2l0Lm9yZz4KIAogICAgICAgICBSZXZpZXdlZCBi
eSBBbmRlcnMgQ2FybHNzb24uCkluZGV4OiBTb3VyY2UvSmF2YVNjcmlwdENvcmUveWFyci9ZYXJy
UGF0dGVybi5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNlL0phdmFTY3JpcHRDb3JlL3lhcnIvWWFy
clBhdHRlcm4uY3BwCShyZXZpc2lvbiA3OTU2NSkKKysrIFNvdXJjZS9KYXZhU2NyaXB0Q29yZS95
YXJyL1lhcnJQYXR0ZXJuLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNDk1LDcgKzQ5NSw5IEBAIHB1
YmxpYzoKIAogICAgICAgICBmb3IgKHVuc2lnbmVkIGkgPSAwOyBpIDwgbnVtUGFyZW5BbHRlcm5h
dGl2ZXM7IGkrKykgewogICAgICAgICAgICAgaWYgKCFwYXJlbnRoZXNlc0Rpc2p1bmN0aW9uLT5t
X2FsdGVybmF0aXZlc1tpXS0+bV90ZXJtcy5zaXplKCkgJiYgbnVtUGFyZW5BbHRlcm5hdGl2ZXMg
PiAxKSB7CisgICAgICAgICAgICAgICAgUGF0dGVybkFsdGVybmF0aXZlKiBhbHRUb1JlbW92ZSA9
IHBhcmVudGhlc2VzRGlzanVuY3Rpb24tPm1fYWx0ZXJuYXRpdmVzW2ldOwogICAgICAgICAgICAg
ICAgIHBhcmVudGhlc2VzRGlzanVuY3Rpb24tPm1fYWx0ZXJuYXRpdmVzLnJlbW92ZShpKTsKKyAg
ICAgICAgICAgICAgICBkZWxldGUgYWx0VG9SZW1vdmU7CiAgICAgICAgICAgICAgICAgLS1udW1Q
YXJlbkFsdGVybmF0aXZlczsKIAogICAgICAgICAgICAgICAgIGNvbnRhaW5zRW1wdHlBbHRlcm5h
dGl2ZSA9IHRydWU7Cg==
</data>
<flag name="review"
          id="75542"
          type_id="1"
          status="+"
          setter="oliver"
    />
          </attachment>
      

    </bug>

</bugzilla>