Review Request 109555: kjs: Avoid overflow computing availableStackSize in KJS::RegExp::match

Commit Hook null at kde.org
Sat Mar 30 15:14:51 GMT 2013


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

(Updated March 30, 2013, 3:14 p.m.)


Status
------

This change has been marked as submitted.


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130330/ba01847b/attachment.htm>


More information about the kde-core-devel mailing list