Bug 15245
| Summary: | [S60] Browser crash in String.replace() with Japanese characters and RegExp containing "\s" | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marcus Groeber <marcus.groeber> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | CLOSED INVALID | ||
| Severity: | Normal | CC: | marcus.groeber |
| Priority: | P2 | ||
| Version: | 523.x (Safari 3) | ||
| Hardware: | S60 Hardware | ||
| OS: | S60 3rd edition | ||
Marcus Groeber
I found that a webpage with the following code will reliably crash the browser with a KERN-EXEC 3 on my Nokia E90 (FW 07.24.0.3) and probably the N95 with latest firmware as well:
<script>
var str = "\u65e5\u672c\u8a9e";
document.write(str.replace(/\s/, ''));
</script>
This was not an issue in older browsers, and I can't reproduce it on the emulator (with the outdated S60WebKit revision that can still be compiled), so it seems like a fairly recent regression, perhaps related to changes in Unicode support for regexps?
This sounds rather obscure, but is not quite as strange if you consider that this type of regexp is often used in "trim" functions to remove extra whitespace from all sorts of strings that might be thrown at it...
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
Does not affect ToT WebKit r25670.
Bradley Morrison
Bulk update of s60 bugs - tagging and closing.
Bradley Morrison
Bulk closing of all s60 platform bugs.
Sorry for the noise!
Joel Parks
re-purposing InTSW keyword for use by QtWebkit team