<?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>47356</bug_id>
          
          <creation_ts>2010-10-07 09:50:24 -0700</creation_ts>
          <short_desc>ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount</short_desc>
          <delta_ts>2011-01-24 07:57:33 -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>Other</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>0</everconfirmed>
          <reporter name="David Goodwin">david_goodwin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>dave+webkit</cc>
    
    <cc>ggaren</cc>
    
    <cc>oliver</cc>
    
    <cc>thomas</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>291063</commentid>
    <comment_count>0</comment_count>
    <who name="David Goodwin">david_goodwin</who>
    <bug_when>2010-10-07 09:50:24 -0700</bug_when>
    <thetext>The generated instructions include operations like:

	ebb08f0c	undefined

which should be:

	ebb00f0c	cmp.w	r0, ip

Note the 1-bit difference. This comes from high-order shift-amount bit which must be 0 in cmp and many other operations (apparently the undefined behavior when this is 1 is to just ignore the 1 and do the right thing, I assume that is why we aren&apos;t seeing any actual failure because of this). This stems from ShiftTypeAndAmount which stores shift type and amount as:

    union {
        struct {
            unsigned lo4 : 4;
            unsigned hi4 : 4;
        };
        struct {
            unsigned type   : 2;
            unsigned amount : 5;
        };
    } m_u;

Objects of this type are initialized with type = amount = 0, but note that this does not clear all hi4 bits. The attached patch increases amount to 6 bits to fix (we already ensure that the amount value is &gt; 32).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>291079</commentid>
    <comment_count>1</comment_count>
      <attachid>70105</attachid>
    <who name="David Goodwin">david_goodwin</who>
    <bug_when>2010-10-07 10:01:17 -0700</bug_when>
    <thetext>Created attachment 70105
Fix partial uninitialization</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>291252</commentid>
    <comment_count>2</comment_count>
      <attachid>70105</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-07 14:20:09 -0700</bug_when>
    <thetext>Comment on attachment 70105
Fix partial uninitialization

Rejecting patch 70105 from commit-queue.

Failed to run &quot;[&apos;./WebKitTools/Scripts/webkit-patch&apos;, &apos;--status-host=queues.webkit.org&apos;, &apos;build-and-test&apos;, &apos;--no-clean&apos;, &apos;--no-update&apos;, &apos;--test&apos;, &apos;--quiet&apos;, &apos;--non-interactive&apos;]&quot; exit_code: 2
Last 500 characters of output:
l tests successful.
Files=14, Tests=304,  1 wallclock secs ( 0.73 cusr +  0.17 csys =  0.90 CPU)
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default&apos;.
Running tests from /Projects/CommitQueue/LayoutTests
Testing 21483 test cases.
java/lc3/JSObject/ToObject-001.html -&gt; failed

Exiting early after 1 failures. 17534 tests run.
282.36s total testing time

17533 test cases (99%) succeeded
1 test case (&lt;1%) had incorrect layout
28 test cases (&lt;1%) had stderr output

Full output: http://queues.webkit.org/results/4162142</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>291421</commentid>
    <comment_count>3</comment_count>
      <attachid>70105</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-07 20:16:56 -0700</bug_when>
    <thetext>Comment on attachment 70105
Fix partial uninitialization

Clearing flags on attachment: 70105

Committed r69372: &lt;http://trac.webkit.org/changeset/69372&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>291422</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-07 20:17:01 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>339016</commentid>
    <comment_count>5</comment_count>
    <who name="David Tapuska">dave+webkit</who>
    <bug_when>2011-01-24 07:57:33 -0800</bug_when>
    <thetext>*** Bug 45669 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>70105</attachid>
            <date>2010-10-07 10:01:17 -0700</date>
            <delta_ts>2010-10-07 20:16:56 -0700</delta_ts>
            <desc>Fix partial uninitialization</desc>
            <filename>47356.txt</filename>
            <type>text/plain</type>
            <size>1010</size>
            <attacher name="David Goodwin">david_goodwin</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDY5MzEzKQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTIgQEAKKzIwMTAtMTAtMDcgIERhdmlkIEdv
b2R3aW4gIDxkYXZpZF9nb29kd2luQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICBBUk0gSklUIGdlbmVyYXRlcyB1bmRlZmluZWQgb3Bl
cmF0aW9ucyBkdWUgdG8gcGFydGlhbGx5IHVuaW5pdGlhbGl6ZWQgU2hpZnRUeXBlQW5kQW1vdW50
CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD00NzM1Ngor
CisgICAgICAgICogYXNzZW1ibGVyL0FSTXY3QXNzZW1ibGVyLmg6CisKIDIwMTAtMTAtMDYgIENo
cmlzIEV2YW5zICA8Y2V2YW5zQGdvb2dsZS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgRGF2
aWQgTGV2aW4uCkluZGV4OiBKYXZhU2NyaXB0Q29yZS9hc3NlbWJsZXIvQVJNdjdBc3NlbWJsZXIu
aAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0Q29yZS9hc3NlbWJsZXIvQVJNdjdBc3NlbWJsZXIu
aAkocmV2aXNpb24gNjkxOTcpCisrKyBKYXZhU2NyaXB0Q29yZS9hc3NlbWJsZXIvQVJNdjdBc3Nl
bWJsZXIuaAkod29ya2luZyBjb3B5KQpAQCAtNDQwLDcgKzQ0MCw3IEBAIHByaXZhdGU6CiAgICAg
ICAgIH07CiAgICAgICAgIHN0cnVjdCB7CiAgICAgICAgICAgICB1bnNpZ25lZCB0eXBlICAgOiAy
OwotICAgICAgICAgICAgdW5zaWduZWQgYW1vdW50IDogNTsKKyAgICAgICAgICAgIHVuc2lnbmVk
IGFtb3VudCA6IDY7CiAgICAgICAgIH07CiAgICAgfSBtX3U7CiB9Owo=
</data>

          </attachment>
      

    </bug>

</bugzilla>