Review Request: KJS: fix behaviour on allocation errors

Rolf Eike Beer kde at opensource.sf-tec.de
Tue May 15 20:07:25 BST 2012


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

Review request for kdelibs.


Description
-------

The KJS allocator will likely crash with a 0-deref on allocation errors. The exact behaviour will also depend on the platform, e.g. a Un*x platform without posix_memalign() will have MAP_FAILED as the pointer used for calculations (which is (void*)-1), other will have 0.

This will make the allocator have a sane default behaviour: just return 0.


Diffs
-----

  kjs/collector.cpp 70e4757 

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


Testing
-------


Thanks,

Rolf Eike Beer

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


More information about the kde-core-devel mailing list