<?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>77422</bug_id>
          
          <creation_ts>2012-01-31 03:48:31 -0800</creation_ts>
          <short_desc>Fix type punning warning in HashTable.h debug builds</short_desc>
          <delta_ts>2012-02-02 11:13:08 -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>Web Template Framework</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="Andy Wingo">wingo</reporter>
          <assigned_to name="Andy Wingo">wingo</assigned_to>
          <cc>andersca</cc>
    
    <cc>aroben</cc>
    
    <cc>barraclough</cc>
    
    <cc>darin</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>545925</commentid>
    <comment_count>0</comment_count>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-01-31 03:48:31 -0800</bug_when>
    <thetext>The patch to be attached fixes warnings like this one:

../../Source/JavaScriptCore/API/JSObjectRef.cpp:548:1:   instantiated from here
../../Source/JavaScriptCore/wtf/HashTable.h:481:90: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Why does it work, you ask?  That, dear sir or madam, I do not know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545927</commentid>
    <comment_count>1</comment_count>
      <attachid>124704</attachid>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-01-31 03:50:10 -0800</bug_when>
    <thetext>Created attachment 124704
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545929</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-31 03:51:53 -0800</bug_when>
    <thetext>Attachment 124704 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/update-webkit&apos;]&quot; exit_code: 9

Updating OpenSource
First, rewinding head to replay your work on top of it...
Applying: Fix compilation errors on build-webkit --debug --no-workers on mac.
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging LayoutTests/ChangeLog
CONFLICT (content): Merge conflict in LayoutTests/ChangeLog
Auto-merging LayoutTests/platform/qt/Skipped
CONFLICT (content): Merge conflict in LayoutTests/platform/qt/Skipped
Auto-merging Source/WebCore/ChangeLog
CONFLICT (content): Merge conflict in Source/WebCore/ChangeLog
Failed to merge in the changes.
Patch failed at 0001 Fix compilation errors on build-webkit --debug --no-workers on mac.

When you have resolved this problem run &quot;git rebase --continue&quot;.
If you would prefer to skip this patch, instead run &quot;git rebase --skip&quot;.
To restore the original branch and stop rebasing run &quot;git rebase --abort&quot;.

rebase refs/remotes/origin/master: command returned error: 1

Died at Tools/Scripts/update-webkit line 164.


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545932</commentid>
    <comment_count>3</comment_count>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-01-31 04:01:35 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Falling back to patching base and 3-way merge...
&gt; Auto-merging LayoutTests/ChangeLog

My patch does not touch this file.  What&apos;s up with that?

Andy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545934</commentid>
    <comment_count>4</comment_count>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-01-31 04:04:22 -0800</bug_when>
    <thetext>Adding Darin and Adam for review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>546098</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-01-31 08:45:00 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; Why does it work, you ask? That, dear sir or madam, I do not know.

Oof. That’s a problem. We should figure out why. If possible, this fix should be done in the reinterpret_cast_ptr template rather than at the call site.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>546368</commentid>
    <comment_count>6</comment_count>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-01-31 12:30:21 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #0)
&gt; &gt; Why does it work, you ask? That, dear sir or madam, I do not know.
&gt; 
&gt; Oof. That’s a problem. We should figure out why. If possible, this fix should be done in the reinterpret_cast_ptr template rather than at the call site.

I did some investigations before making this patch. The reinterpret_cast_ptr looks correct to my knowledge.  The case that is taken for the aligned buffer is the __may_alias__ case.  This is x86-64, so reinterpret_cast_ptr is reinterpret_cast.

Every time I think I find a gcc bug I have been wrong.  Still, it sounds possible in this case.  This is gcc 4.6.2 from Debian unstable, with the default compilation options for the GTK+ port.

FWIW, I have seen this warning for months, but only got bothered enough to look at it today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547106</commentid>
    <comment_count>7</comment_count>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-02-01 08:52:00 -0800</bug_when>
    <thetext>WDYT, Darin?  It is a bit inscrutable, but it is a correct change, and it makes --debug more useful for the gtk port.  As it is, this error typically occurs for every file that is compiled, and it is preceded by hundreds of lines of template gobbledygook each time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547186</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-02-01 10:33:01 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; but it is a correct change

I’m not sure what you mean by “correct change”. It’s probably OK to change this so the compiler stops complaining, but there is no reason this change should have any effect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547332</commentid>
    <comment_count>9</comment_count>
    <who name="Andy Wingo">wingo</who>
    <bug_when>2012-02-01 13:33:22 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; but it is a correct change
&gt; 
&gt; I’m not sure what you mean by “correct change”. It’s probably OK to change this so the compiler stops complaining, but there is no reason this change should have any effect.

I didn&apos;t express myself well. I meant exactly what you said here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547355</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-02-01 14:04:41 -0800</bug_when>
    <thetext>Anders, Gavin, do you have any alternative to landing this, and/or do you think it’s OK to just do this to sidestep the warning Andy is running into?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547496</commentid>
    <comment_count>11</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-02-01 17:00:27 -0800</bug_when>
    <thetext>I&apos;ve got no better suggestions, this is fine with me unless Anders has any better ideas.
G.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547532</commentid>
    <comment_count>12</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-02-01 17:51:50 -0800</bug_when>
    <thetext>I don&apos;t have any better ideas, this looks good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>548000</commentid>
    <comment_count>13</comment_count>
      <attachid>124704</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-02 11:13:03 -0800</bug_when>
    <thetext>Comment on attachment 124704
Patch

Clearing flags on attachment: 124704

Committed r106574: &lt;http://trac.webkit.org/changeset/106574&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>548001</commentid>
    <comment_count>14</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-02 11:13:08 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>124704</attachid>
            <date>2012-01-31 03:50:10 -0800</date>
            <delta_ts>2012-02-02 11:13:03 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-77422-20120131125008.patch</filename>
            <type>text/plain</type>
            <size>1613</size>
            <attacher name="Andy Wingo">wingo</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTA2MjI2CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCA5
NzNhYWU0OTMzNTMwNjYyYzU4MzNiOWRmZWU4MWQyOWMzOGJhMjVkLi44NmRmN2VjOWViMzE4YjBk
Y2U4ZmViNzZjMzUwYzdmYjg3ZWYzZGMxIDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxMyBAQAorMjAxMi0wMS0zMSAgQW5keSBXaW5nbyAgPHdpbmdvQGlnYWxpYS5jb20+CisK
KyAgICAgICAgRml4IHR5cGUgcHVubmluZyB3YXJuaW5nIGluIEhhc2hUYWJsZS5oIGRlYnVnIGJ1
aWxkcworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9Nzc0
MjIKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIHd0
Zi9IYXNoVGFibGUuaCAoV1RGOjpIYXNoVGFibGU6OmNoZWNrS2V5KTogRml4IHR5cGUgcHVubmlu
ZworICAgICAgICB3YXJuaW5nIGFwcGVhcmluZyBpbiBkZWJ1Z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