<?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>15043</bug_id>
          
          <creation_ts>2007-08-21 17:33:04 -0700</creation_ts>
          <short_desc>KJS::allocateBlock(): posix_memalign takes a void** as its first parameter</short_desc>
          <delta_ts>2007-08-29 10:41:53 -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>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Ryan Leavengood">leavengood</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1754</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Leavengood">leavengood</who>
    <bug_when>2007-08-21 17:33:04 -0700</bug_when>
    <thetext>This clearly is not code that any current port uses, since it should not compile without the change attached. But my port makes use of this since it was already in the code, instead of making another #elsif. But as shown by the documentation here:

http://www.opengroup.org/onlinepubs/000095399/functions/posix_memalign.html

the function is being called incorrectly. The simple patch attached corrects that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1750</commentid>
    <comment_count>1</comment_count>
      <attachid>16066</attachid>
    <who name="Ryan Leavengood">leavengood</who>
    <bug_when>2007-08-21 17:35:04 -0700</bug_when>
    <thetext>Created attachment 16066
Fix to posix_memalign call in KJS::allocateBlock</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1752</commentid>
    <comment_count>2</comment_count>
      <attachid>16066</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-08-21 17:38:53 -0700</bug_when>
    <thetext>Comment on attachment 16066
Fix to posix_memalign call in KJS::allocateBlock

I also don&apos;t think the reinterpret_cast is needed on the next line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1753</commentid>
    <comment_count>3</comment_count>
    <who name="Ryan Leavengood">leavengood</who>
    <bug_when>2007-08-21 17:45:36 -0700</bug_when>
    <thetext>Would you like me to make that change and create another patch, or could you take care of it? :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1748</commentid>
    <comment_count>4</comment_count>
      <attachid>16067</attachid>
    <who name="Ryan Leavengood">leavengood</who>
    <bug_when>2007-08-21 18:28:52 -0700</bug_when>
    <thetext>Created attachment 16067
The same patch, with the removal of the reinterpret_cast in the memset call</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1741</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-08-21 21:46:35 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; This clearly is not code that any current port uses, since it should not
&gt; compile without the change attached. But my port makes use of this since it was
&gt; already in the code, instead of making another #elsif. [...]

What port are you working on?  :)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1736</commentid>
    <comment_count>6</comment_count>
    <who name="Ryan Leavengood">leavengood</who>
    <bug_when>2007-08-22 06:22:52 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; 
&gt; What port are you working on?  :)

I am porting WebKit to Haiku, http://haiku-os.org. It is a clone of BeOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1301</commentid>
    <comment_count>7</comment_count>
      <attachid>16067</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-08-28 21:17:07 -0700</bug_when>
    <thetext>Comment on attachment 16067
The same patch, with the removal of the reinterpret_cast in the memset call

r=me

Probably other ports could use memalign too, but don&apos;t set the right ifdef so they get the generic mmap-based version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-08-29 10:41:53 -0700</bug_when>
    <thetext>Landed in r25296.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16066</attachid>
            <date>2007-08-21 17:35:04 -0700</date>
            <delta_ts>2007-08-21 21:33:26 -0700</delta_ts>
            <desc>Fix to posix_memalign call in KJS::allocateBlock</desc>
            <filename>posix_memalign_patch.txt</filename>
            <type>text/plain</type>
            <size>1207</size>
            <attacher name="Ryan Leavengood">leavengood</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDI1MTgxKQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTIgQEAKKzIwMDctMDgtMjEgIFJ5YW4gTGVh
dmVuZ29vZCA8bGVhdmVuZ29vZEBnbWFpbC5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCisKKyAgICAgICAgLSBwb3NpeF9tZW1hbGlnbiB0YWtlcyBhIHZvaWQqKiBh
cyBpdHMgZmlyc3QgcGFyYW1ldGVyLiBNeSBwb3J0IG1ha2VzIHVzZSBvZiB0aGlzIGZ1bmN0aW9u
IGNhbGwuCisKKyAgICAgICAgKiBranMvY29sbGVjdG9yLmNwcDoKKyAgICAgICAgKEtKUzo6YWxs
b2NhdGVCbG9jayk6CisKIDIwMDctMDgtMTYgIEtldmluIE1jQ3VsbG91Z2ggIDxrbWNjdWxsb3Vn
aEBhcHBsZS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgR2VvZmYgYW5kIEFkYW0uCkluZGV4
OiBKYXZhU2NyaXB0Q29yZS9ranMvY29sbGVjdG9yLmNwcAo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2Ny
aXB0Q29yZS9ranMvY29sbGVjdG9yLmNwcAkocmV2aXNpb24gMjUxNDkpCisrKyBKYXZhU2NyaXB0
Q29yZS9ranMvY29sbGVjdG9yLmNwcAkod29ya2luZyBjb3B5KQpAQCAtMTA5LDcgKzEwOSw3IEBA
IHN0YXRpYyBDb2xsZWN0b3JCbG9jayogYWxsb2NhdGVCbG9jaygpCiAgICAgTFBWT0lEIGFkZHJl
c3MgPSBWaXJ0dWFsQWxsb2MoTlVMTCwgQkxPQ0tfU0laRSwgTUVNX0NPTU1JVCB8IE1FTV9SRVNF
UlZFLCBQQUdFX1JFQURXUklURSk7CiAjZWxpZiBIQVZFKFBPU0lYX01FTUFMSUdOKQogICAgIHZv
aWQqIGFkZHJlc3M7Ci0gICAgcG9zaXhfbWVtYWxpZ24oYWRkcmVzcywgQkxPQ0tfU0laRSwgQkxP
Q0tfU0laRSk7CisgICAgcG9zaXhfbWVtYWxpZ24oJmFkZHJlc3MsIEJMT0NLX1NJWkUsIEJMT0NL
X1NJWkUpOwogICAgIG1lbXNldChyZWludGVycHJldF9jYXN0PHZvaWQqPihhZGRyZXNzKSwgMCwg
QkxPQ0tfU0laRSk7CiAjZWxzZQogICAgIHN0YXRpYyBzaXplX3QgcGFnZXNpemUgPSBnZXRwYWdl
c2l6ZSgpOwogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16067</attachid>
            <date>2007-08-21 18:28:52 -0700</date>
            <delta_ts>2007-08-28 21:17:07 -0700</delta_ts>
            <desc>The same patch, with the removal of the reinterpret_cast in the memset call</desc>
            <filename>posix_memalign_patch.txt</filename>
            <type>text/plain</type>
            <size>1248</size>
            <attacher name="Ryan Leavengood">leavengood</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDI1MTgxKQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTIgQEAKKzIwMDctMDgtMjEgIFJ5YW4gTGVh
dmVuZ29vZCA8bGVhdmVuZ29vZEBnbWFpbC5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCisKKyAgICAgICAgLSBwb3NpeF9tZW1hbGlnbiB0YWtlcyBhIHZvaWQqKiBh
cyBpdHMgZmlyc3QgcGFyYW1ldGVyLiBNeSBwb3J0IG1ha2VzIHVzZSBvZiB0aGlzIGZ1bmN0aW9u
IGNhbGwuCisKKyAgICAgICAgKiBranMvY29sbGVjdG9yLmNwcDoKKyAgICAgICAgKEtKUzo6YWxs
b2NhdGVCbG9jayk6CisKIDIwMDctMDgtMTYgIEtldmluIE1jQ3VsbG91Z2ggIDxrbWNjdWxsb3Vn
aEBhcHBsZS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgR2VvZmYgYW5kIEFkYW0uCkluZGV4
OiBKYXZhU2NyaXB0Q29yZS9ranMvY29sbGVjdG9yLmNwcAo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2Ny
aXB0Q29yZS9ranMvY29sbGVjdG9yLmNwcAkocmV2aXNpb24gMjUxNDkpCisrKyBKYXZhU2NyaXB0
Q29yZS9ranMvY29sbGVjdG9yLmNwcAkod29ya2luZyBjb3B5KQpAQCAtMTA5LDggKzEwOSw4IEBA
IHN0YXRpYyBDb2xsZWN0b3JCbG9jayogYWxsb2NhdGVCbG9jaygpCiAgICAgTFBWT0lEIGFkZHJl
c3MgPSBWaXJ0dWFsQWxsb2MoTlVMTCwgQkxPQ0tfU0laRSwgTUVNX0NPTU1JVCB8IE1FTV9SRVNF
UlZFLCBQQUdFX1JFQURXUklURSk7CiAjZWxpZiBIQVZFKFBPU0lYX01FTUFMSUdOKQogICAgIHZv
aWQqIGFkZHJlc3M7Ci0gICAgcG9zaXhfbWVtYWxpZ24oYWRkcmVzcywgQkxPQ0tfU0laRSwgQkxP
Q0tfU0laRSk7Ci0gICAgbWVtc2V0KHJlaW50ZXJwcmV0X2Nhc3Q8dm9pZCo+KGFkZHJlc3MpLCAw
LCBCTE9DS19TSVpFKTsKKyAgICBwb3NpeF9tZW1hbGlnbigmYWRkcmVzcywgQkxPQ0tfU0laRSwg
QkxPQ0tfU0laRSk7CisgICAgbWVtc2V0KGFkZHJlc3MsIDAsIEJMT0NLX1NJWkUpOwogI2Vsc2UK
ICAgICBzdGF0aWMgc2l6ZV90IHBhZ2VzaXplID0gZ2V0cGFnZXNpemUoKTsKICAgICAK
</data>
<flag name="review"
          id="6743"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>