<?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>117991</bug_id>
          
          <creation_ts>2013-06-25 08:03:05 -0700</creation_ts>
          <short_desc>Fix cast-align warnings in FastMalloc.cpp</short_desc>
          <delta_ts>2013-07-03 03:20:04 -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>New Bugs</component>
          <version>528+ (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="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Csaba Osztrogonác">ossy</assigned_to>
          <cc>benjamin</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>903329</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-06-25 08:03:05 -0700</bug_when>
    <thetext>/home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:102: warning: cast from &apos;char*&apos; to &apos;uint32_t* {aka unsigned int*}&apos; increases required alignment of target type [-Wcast-align]
/home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:194: warning: cast from &apos;char*&apos; to &apos;uint32_t* {aka unsigned int*}&apos; increases required alignment of target type [-Wcast-align]
/home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:305: warning: cast from &apos;char*&apos; to &apos;uint32_t* {aka unsigned int*}&apos; increases required alignment of target type [-Wcast-align]
/home/oszi/WebKit/Source/WTF/wtf/FastMalloc.cpp:3167:52: warning: cast from &apos;char*&apos; to &apos;uint32_t* {aka unsigned int*}&apos; increases required alignment of target type [-Wcast-align]

3167: POISON_DEALLOCATION_EXPLICIT(ptr, size, startPoison, endPoison);

#define POISON_DEALLOCATION_EXPLICIT(allocation, allocationSize, startPoison, endPoison) do { \
    ASSERT((allocationSize) &gt;= 2 * sizeof(uint32_t)); \
    reinterpret_cast&lt;uint32_t*&gt;(allocation)[0] = 0xbadbeef9; \
    reinterpret_cast&lt;uint32_t*&gt;(allocation)[1] = 0xbadbeefb; \
    if ((allocationSize) &lt; 4 * sizeof(uint32_t)) \
        break; \
    reinterpret_cast&lt;uint32_t*&gt;(allocation)[2] = (startPoison) ^ PTR_TO_UINT32(allocation); \
    reinterpret_cast&lt;uint32_t*&gt;(allocation)[END_POISON_INDEX(allocationSize)] = (endPoison) ^ PTR_TO_UINT32(allocation); \
} while (false)

This define introduced in 
- https://trac.webkit.org/changeset/143488/trunk/Source/WTF/wtf/FastMalloc.cpp
- https://trac.webkit.org/changeset/143996/trunk/Source/WTF/wtf/FastMalloc.cpp

The question is that ptr in line 3167 is uint32_t aligned or not?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>904953</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-01 02:23:47 -0700</bug_when>
    <thetext>Could you check if they can be a valid warnings or can we suppress 
them with using reinterpret_cast_ptr instead of reinterpret_cast ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905433</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-02 07:56:35 -0700</bug_when>
    <thetext>any idea?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905446</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2013-07-02 08:35:05 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; any idea?

I think this one is okay to change to reinterpret_cast_ptr too because all FastMalloc allocations are guaranteed to be at least 8 byte aligned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905448</commentid>
    <comment_count>4</comment_count>
      <attachid>205919</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-02 08:38:31 -0700</bug_when>
    <thetext>Created attachment 205919
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905450</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-02 08:44:15 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; any idea?
&gt; 
&gt; I think this one is okay to change to reinterpret_cast_ptr too because all FastMalloc allocations are guaranteed to be at least 8 byte aligned.

Thanks, I attached the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905457</commentid>
    <comment_count>6</comment_count>
      <attachid>205919</attachid>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2013-07-02 09:13:25 -0700</bug_when>
    <thetext>Comment on attachment 205919
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905792</commentid>
    <comment_count>7</comment_count>
      <attachid>205919</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-03 03:19:58 -0700</bug_when>
    <thetext>Comment on attachment 205919
Patch

Clearing flags on attachment: 205919

Committed r152349: &lt;http://trac.webkit.org/changeset/152349&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>905793</commentid>
    <comment_count>8</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2013-07-03 03:20:04 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>205919</attachid>
            <date>2013-07-02 08:38:31 -0700</date>
            <delta_ts>2013-07-03 03:19:58 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-117991-20130702083633.patch</filename>
            <type>text/plain</type>
            <size>1940</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTUyMjkzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV1RGL0NoYW5n
ZUxvZyBiL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCmluZGV4IDYxY2U5ZjkzYWE5NDUxMDM2MDMwYzEz
Yjc4ODI4ZDM5ZWE2OTAwNzMuLjg3NmQxOTE1YTEwYmFlMjM5OWMyMzlmZTk0MDQyMzk1OWNjZGNj
NzUgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XVEYvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XVEYvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTIgQEAKKzIwMTMtMDctMDIgIENzYWJhIE9zenRyb2dvbsOhYyAg
PG9zc3lAd2Via2l0Lm9yZz4KKworICAgICAgICBGaXggY2FzdC1hbGlnbiB3YXJuaW5ncyBpbiBG
YXN0TWFsbG9jLmNwcAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5j
Z2k/aWQ9MTE3OTkxCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAg
ICAgICAgKiB3dGYvRmFzdE1hbGxvYy5jcHA6CisKIDIwMTMtMDctMDIgIE1pa2hhaWwgUG96ZG55
YWtvdiAgPG1pa2hhaWwucG96ZG55YWtvdkBpbnRlbC5jb20+CiAKICAgICAgICAgQXZvaWQgY29k
ZSBk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IDwgNCAqIHNpemVvZih1aW50MzJfdCkpIFwKICAgICAgICAgYnJlYWs7IFwKLSAgICByZWlu
dGVycHJldF9jYXN0PHVpbnQzMl90Kj4oYWxsb2NhdGlvbilbMl0gPSAoc3RhcnRQb2lzb24pIF4g
UFRSX1RPX1VJTlQzMihhbGxvY2F0aW9uKTsgXAotICAgIHJlaW50ZXJwcmV0X2Nhc3Q8dWludDMy
X3QqPihhbGxvY2F0aW9uKVtFTkRfUE9JU09OX0lOREVYKGFsbG9jYXRpb25TaXplKV0gPSAoZW5k
UG9pc29uKSBeIFBUUl9UT19VSU5UMzIoYWxsb2NhdGlvbik7IFwKKyAgICByZWludGVycHJldF9j
YXN0X3B0cjx1aW50MzJfdCo+KGFsbG9jYXRpb24pWzJdID0gKHN0YXJ0UG9pc29uKSBeIFBUUl9U
T19VSU5UMzIoYWxsb2NhdGlvbik7IFwKKyAgICByZWludGVycHJldF9jYXN0X3B0cjx1aW50MzJf
dCo+KGFsbG9jYXRpb24pW0VORF9QT0lTT05fSU5ERVgoYWxsb2NhdGlvblNpemUpXSA9IChlbmRQ
b2lzb24pIF4gUFRSX1RPX1VJTlQzMihhbGxvY2F0aW9uKTsgXAogfSB3aGlsZSAoZmFsc2UpCiAK
ICNkZWZpbmUgUE9JU09OX0RFQUxMT0NBVElPTihhbGxvY2F0aW9uLCBhbGxvY2F0aW9uU2l6ZSkg
XAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>