<?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>58131</bug_id>
          
          <creation_ts>2011-04-08 03:19:11 -0700</creation_ts>
          <short_desc>Fix compilation with Solaris 10/Sun Studio 12: moving elements in a vector requires source not to be const</short_desc>
          <delta_ts>2011-04-13 03:07:14 -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>PC</rep_platform>
          <op_sys>Other</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>0</everconfirmed>
          <reporter name="Ben Taylor">bentaylor.solx86</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>commit-queue</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>382119</commentid>
    <comment_count>0</comment_count>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-04-08 03:19:11 -0700</bug_when>
    <thetext>I don&apos;t know why the compiler couldn&apos;t call src-&gt;~T() on a const T *src,
but fact is it couldn&apos;t.

In any case, since move is copying the source and deleting it, formally
the argument shouldn&apos;t be const anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>382153</commentid>
    <comment_count>1</comment_count>
      <attachid>88801</attachid>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-04-08 04:52:27 -0700</bug_when>
    <thetext>Created attachment 88801
Fixing a compile issue on Solaris 10 with Sun Studio 12 C++, fix a modified src parameter to not be const

Patch to fix the compile issue on Solaris 10 with Sun Studio 12, originally created by
Thiago Macieria as part of patch11/17 from bug https://bugs.webkit.org/show_bug.cgi?id=24932</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>382412</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-04-08 11:41:30 -0700</bug_when>
    <thetext>+        Fix compile issue on Solaris 10/Sun Studio 12, since the move is copying 
+        the source and deleting it, formally the argument shouldn&apos;t be const anyway.

This is a questionable explanation. The ability to delete an object via a const pointer is a normal C++ behavior, and playing against C++ is not safe. Wouldn&apos;t it be better to do a const_cast when destructing as a workaround?

Besides, if src should be non-const, why doesn&apos;t the same apply to srcEnd?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>384630</commentid>
    <comment_count>3</comment_count>
      <attachid>89328</attachid>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-04-12 19:38:31 -0700</bug_when>
    <thetext>Created attachment 89328
Updated patch per recommendation of reviewer. This makes it very clear why we fix what we do.

This patch is to work around an obscure compiler bug in Sun Studio 12 (fixed in SS12.1 and SS12.2) where the compiler couldn&apos;t call src-&gt;~T() on a const T *src</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>384656</commentid>
    <comment_count>4</comment_count>
      <attachid>89328</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-04-12 21:35:55 -0700</bug_when>
    <thetext>Comment on attachment 89328
Updated patch per recommendation of reviewer. This makes it very clear why we fix what we do.

Do you know how long we&apos;ll have to support these old versions of the compiler? Why are they still important?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>384705</commentid>
    <comment_count>5</comment_count>
      <attachid>89328</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-04-12 23:45:48 -0700</bug_when>
    <thetext>Comment on attachment 89328
Updated patch per recommendation of reviewer. This makes it very clear why we fix what we do.

Clearing flags on attachment: 89328

Committed r83704: &lt;http://trac.webkit.org/changeset/83704&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>384706</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-04-12 23:45:54 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>384767</commentid>
    <comment_count>7</comment_count>
    <who name="Ben Taylor">bentaylor.solx86</who>
    <bug_when>2011-04-13 03:07:14 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 89328 [details])
&gt; Do you know how long we&apos;ll have to support these old versions of the compiler? Why are they still important?

SS12 is important as it can still build QT/webkit on Solaris 10.  SS12.1/12.2 is a new compiler engine, and specificially SS12.2 has bugs that *fail* the compiler with an internal error.  Additionally, Even if that bug is fixed, you have to now have a support contract to get the fix.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>88801</attachid>
            <date>2011-04-08 04:52:27 -0700</date>
            <delta_ts>2011-04-12 19:38:31 -0700</delta_ts>
            <desc>Fixing a compile issue on Solaris 10 with Sun Studio 12 C++, fix a modified src parameter to not be const</desc>
            <filename>webkit-bug-58131-FixConst-nessOfAManipulatedParameter.diff</filename>
            <type>text/plain</type>
            <size>2942</size>
            <attacher name="Ben Taylor">bentaylor.solx86</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gODMyODEpCisrKyBTb3VyY2Uv
SmF2YVNjcmlwdENvcmUvQ2hhbm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3B5LCBUPjo6bW92ZShzcmMsIHNyY0VuZCwgZHN0KTsKICAgICAgICAgfQogCi0gICAg
ICAgIHN0YXRpYyB2b2lkIG1vdmVPdmVybGFwcGluZyhjb25zdCBUKiBzcmMsIGNvbnN0IFQqIHNy
Y0VuZCwgVCogZHN0KQorICAgICAgICBzdGF0aWMgdm9pZCBtb3ZlT3ZlcmxhcHBpbmcoVCogc3Jj
LCBjb25zdCBUKiBzcmNFbmQsIFQqIGRzdCkKICAgICAgICAgewogICAgICAgICAgICAgVmVjdG9y
TW92ZXI8VmVjdG9yVHJhaXRzPFQ+OjpjYW5Nb3ZlV2l0aE1lbWNweSwgVD46Om1vdmVPdmVybGFw
cGluZyhzcmMsIHNyY0VuZCwgZHN0KTsKICAgICAgICAgfQo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>89328</attachid>
            <date>2011-04-12 19:38:31 -0700</date>
            <delta_ts>2011-04-12 23:45:48 -0700</delta_ts>
            <desc>Updated patch per recommendation of reviewer. This makes it very clear why we fix what we do.</desc>
            <filename>webkit-bug-58131-Workaround-SS12-compiler-bug.diff</filename>
            <type>text/plain</type>
            <size>1210</size>
            <attacher name="Ben Taylor">bentaylor.solx86</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gODM2ODIpCisrKyBTb3VyY2Uv
SmF2YVNjcmlwdENvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTQgQEAK
KzIwMTEtMDQtMTIgIEJlbiBUYXlsb3IgIDxiZW50YXlsb3Iuc29seDg2QGdtYWlsLmNvbT4KKwor
ICAgICAgICBS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AgICAgICAgICAgICAgICAgc3JjLT5+VCgpOwor
I2VuZGlmCiAgICAgICAgICAgICAgICAgKytkc3Q7CiAgICAgICAgICAgICAgICAgKytzcmM7CiAg
ICAgICAgICAgICB9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>