[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Review Request 109555: kjs: Avoid overflow computing availableStackSize in KJS::RegExp::match
From:       "Bernd Buschinski" <b.buschinski () googlemail ! com>
Date:       2013-03-18 0:45:12
Message-ID: 20130318004512.21614.81709 () vidsolbach ! de
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109555/
-----------------------------------------------------------

Review request for kdelibs.


Description
-------

the Patch differs from the patch in Bug 316923
as it also makes
ulimit -s 2147483649
work.

On Systems that don't have rlim_t, availableStackSize is basically just a static \
constant with 8*1024*1024, which fits in int.


This addresses bug 316923.
    http://bugs.kde.org/show_bug.cgi?id=316923


Diffs
-----

  kjs/regexp.h f6132e6 
  kjs/regexp.cpp 5294d62 

Diff: http://git.reviewboard.kde.org/r/109555/diff/


Testing
-------

ulimit -s unlimited
./kjs_bin.shell -e '/a/.test("a")'


ulimit -s 2147483649 (over int limit)
./kjs_bin.shell -e '/a/.test("a")'


ulimit -s 2047483649 (under int limit)
./kjs_bin.shell -e '/a/.test("a")'


and without setting ulimit (default)
./kjs_bin.shell -e '/a/.test("a")'

They all work.


Thanks,

Bernd Buschinski


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/109555/">http://git.reviewboard.kde.org/r/109555/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kdelibs.</div>
<div>By Bernd Buschinski.</div>







<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">the Patch differs from the patch in Bug 316923 as it also makes
ulimit -s 2147483649
work.

On Systems that don&#39;t have rlim_t, availableStackSize is basically just a static \
constant with 8*1024*1024, which fits in int.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
                break-word;">ulimit -s unlimited
./kjs_bin.shell -e &#39;/a/.test(&quot;a&quot;)&#39;


ulimit -s 2147483649 (over int limit)
./kjs_bin.shell -e &#39;/a/.test(&quot;a&quot;)&#39;


ulimit -s 2047483649 (under int limit)
./kjs_bin.shell -e &#39;/a/.test(&quot;a&quot;)&#39;


and without setting ulimit (default)
./kjs_bin.shell -e &#39;/a/.test(&quot;a&quot;)&#39;

They all work.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=316923">316923</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kjs/regexp.h <span style="color: grey">(f6132e6)</span></li>

 <li>kjs/regexp.cpp <span style="color: grey">(5294d62)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109555/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic