Summary: | Konqueror segfault when parsing too large string as javascript object( jQuery) | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Dennis Noordsij <dennis.noordsij> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | maksim |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dennis Noordsij
2007-10-28 20:11:29 UTC
Just checked, it also crashes Konqueror in KDE 4.0.0. (using Kubuntu packages). libpcre (the library we delegate regular expressions to) runs out of stackspace on that regexp, and hence crashes. The best I can do w/that is make it abort the search, but in that case, there is no guarantee that any search results will be valid. Could you perhaps tell me what the implications of that are in this case? The jQuery javascript toolkit uses (apparently) regular expressions to parse a received html snippet into real DOM. If the search is aborted, konq should not continue to run the script as nothing good can come from that. It could be treated as a javascript error? (not familiar with kjs internals so I don't know if that makes sense) Stopping the script would be at most an inconvience, and much better than losing the whole browser! :) SVN commit 760932 by orlovich: Limit stack usage of libPCRE (and raise an exception when it runs out of stack space, for diagnosibility). Also, do not accept some super old (>4 year old) pcre versions; as they can severely cripple regexp support, and intefere with this bugfix. Also tweak the message about missing PCRE in configure check --- libPCRE doesn't result in "better" regexp support; the support w/o it is a last-resort fallback... Based on patch by Sune Vuorela (username debian, hostname pusling, tld com) BUG:149191 BUG:151477 M +10 -1 CMakeLists.txt M +22 -8 regexp.cpp M +1 -1 regexp.h M +19 -3 regexp_object.cpp M +6 -1 regexp_object.h M +13 -6 string_object.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=760932 SVN commit 760945 by orlovich: Regression test for #149191, #151477 CCBUG:149191 CCBUG:151477 M +7 -0 RegExp.js WebSVN link: http://websvn.kde.org/?view=rev&revision=760945 |