Summary: | Avoid overflow computing availableStackSize in KJS::RegExp::match | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Andreas Schwab <schwab> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | b.buschinski |
Priority: | NOR | ||
Version: | 4.8.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdelibs/ffc8a6a316cacc8df6a91584653fe2c867a5d489 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Avoid overflow when computing availableStackSize from stack limit |
Thx for reporting, but I posted a different solution on reviewboard https://git.reviewboard.kde.org/r/109555/ which also makes $ ulimit -s 2147483649 $ kjs -e '/a/.test("a")' work Git commit ffc8a6a316cacc8df6a91584653fe2c867a5d489 by Bernd Buschinski. Committed on 29/03/2013 at 21:26. Pushed by buschinski into branch 'master'. kjs: Avoid overflow computing availableStackSize in KJS::RegExp::match REVIEW:109555 M +5 -0 kjs/regexp.cpp M +11 -0 kjs/regexp.h http://commits.kde.org/kdelibs/ffc8a6a316cacc8df6a91584653fe2c867a5d489 Bernd, Thanks for fixing this correctly. (and one more reason for submitting fixes upstream instead of submitting random quality patches to the opensuse packages) |
Created attachment 78137 [details] Avoid overflow when computing availableStackSize from stack limit If the current stack limit is unlimited KJS::RegExp::availableStackSize is set to -1 (RLIM_INFINITY), which causes limits.match_limit_recursion being set to 0. This results in the spurious error "RangeError: Resource exhaustion trying to perform regexp match." $ ulimit -s unlimited $ kjs -e '/a/.test("a")' (eval) (line 0): RangeError: Resource exhaustion trying to perform regexp match.