<?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>51974</bug_id>
          
          <creation_ts>2011-01-05 17:48:13 -0800</creation_ts>
          <short_desc>Atomics.h has incorrect GCC test for ext/atomicity.h when using LSB compilers</short_desc>
          <delta_ts>2012-08-08 02:10:41 -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>Linux</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="Craig Scott">audiofanatic</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>jedrzej.nowacki</cc>
    
    <cc>paroga</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>329938</commentid>
    <comment_count>0</comment_count>
    <who name="Craig Scott">audiofanatic</who>
    <bug_when>2011-01-05 17:48:13 -0800</bug_when>
    <thetext>In JacaScriptCore/wtf/Atomics.h the following code block can be found around line 64:

#if OS(WINDOWS)
#include &lt;windows.h&gt;
#elif OS(DARWIN)
#include &lt;libkern/OSAtomic.h&gt;
#elif OS(ANDROID)
#include &lt;cutils/atomic.h&gt;
#elif COMPILER(GCC) &amp;&amp; !OS(SYMBIAN)
#if (__GNUC__ &gt; 4) || ((__GNUC__ == 4) &amp;&amp; (__GNUC_MINOR__ &gt;= 2))
#include &lt;ext/atomicity.h&gt;
#else
#include &lt;bits/atomicity.h&gt;
#endif
#endif

The test for the GCC version is not correct when the LSB compiler is being used under linux, since the LSB headers only have bits/atomicity.h and not ext/atomicity.h. A more correct test would be:

#if ((__GNUC__ &gt; 4) || ((__GNUC__ == 4) &amp;&amp; (__GNUC_MINOR__ &gt;= 2))) &amp;&amp; !defined(__LSB_VERSION__)


For reference, the LSB and Qt bug trackers also have corresponding entries about this particular webkit issue:

http://bugs.linuxbase.org/show_bug.cgi?id=2522
http://bugreports.qt.nokia.com/browse/QTBUG-16329</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>330277</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick R. Gansterer">paroga</who>
    <bug_when>2011-01-06 12:04:16 -0800</bug_when>
    <thetext>Can you provide a patch for this? See http://webkit.org/coding/contributing.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>376207</commentid>
    <comment_count>2</comment_count>
    <who name="Jędrzej Nowacki">jedrzej.nowacki</who>
    <bug_when>2011-03-30 05:09:57 -0700</bug_when>
    <thetext>As far I understand ext/atomicity.h file should not be included at all.

The file starts from this warning:
/** @file atomicity.h
 *  This is an internal header file, included by other library headers.
 *  You should not attempt to use it directly.
 */

Changing status to New</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655779</commentid>
    <comment_count>3</comment_count>
      <attachid>149104</attachid>
    <who name="Alvaro Lopez Ortega">alvaro</who>
    <bug_when>2012-06-22 14:39:38 -0700</bug_when>
    <thetext>Created attachment 149104
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>680290</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-07-27 01:33:36 -0700</bug_when>
    <thetext>Would you like help landing this, i.e. using the commit queue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689841</commentid>
    <comment_count>5</comment_count>
    <who name="Craig Scott">audiofanatic</who>
    <bug_when>2012-08-07 21:17:52 -0700</bug_when>
    <thetext>Not sure what the holdup is here. Alvaro provided a patch, so I&apos;m assuming your last comment was directed to him. My changed employment arrangements mean I no longer can commit time to these issues myself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690069</commentid>
    <comment_count>6</comment_count>
      <attachid>149104</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-08 02:10:38 -0700</bug_when>
    <thetext>Comment on attachment 149104
Patch

Clearing flags on attachment: 149104

Committed r125010: &lt;http://trac.webkit.org/changeset/125010&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690070</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-08 02:10:41 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>149104</attachid>
            <date>2012-06-22 14:39:38 -0700</date>
            <delta_ts>2012-08-08 02:10:38 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-51974-20120622233935.patch</filename>
            <type>text/plain</type>
            <size>1304</size>
            <attacher name="Alvaro Lopez Ortega">alvaro</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XVEYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9XVEYvQ2hh
bmdlTG9nCShyZXZpc2lvbiAxMjEwNTYpCisrKyBTb3VyY2UvV1RGL0NoYW5nZUxvZwkod29ya2lu
ZyBjb3B5KQpAQCAtMSwzICsxLDE0IEBACisyMDEyLTA2LTIyICBBbHZhcm8gTG9wZXogT3J0ZWdh
ICA8YWx2YXJvQGFsb2Jicy5jb20+CisKKyAgICAgICAgQXRvbWljcy5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DX18gPiA0KSB8fCAoKF9fR05VQ19fID09IDQpICYmIChfX0dOVUNfTUlOT1JfXyA+PSAy
KSkKKyNpZiAoKF9fR05VQ19fID4gNCkgfHwgKChfX0dOVUNfXyA9PSA0KSAmJiAoX19HTlVDX01J
Tk9SX18gPj0gMikpKSAmJiAhZGVmaW5lZChfX0xTQl9WRVJTSU9OX18pCiAjaW5jbHVkZSA8ZXh0
L2F0b21pY2l0eS5oPgogI2Vsc2UKICNpbmNsdWRlIDxiaXRzL2F0b21pY2l0eS5oPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>