Bug 15245 - [S60] Browser crash in String.replace() with Japanese characters and RegExp containing "\s"
Summary: [S60] Browser crash in String.replace() with Japanese characters and RegExp c...
Status: CLOSED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: S60 Hardware S60 3rd edition
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-20 10:25 PDT by Marcus Groeber
Modified: 2011-03-21 11:53 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Groeber 2007-09-20 10:25:39 PDT
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...
Comment 1 David Kilzer (:ddkilzer) 2007-09-20 10:46:43 PDT
Does not affect ToT WebKit r25670.

Comment 2 Bradley Morrison 2008-04-09 11:31:56 PDT
Bulk update of s60 bugs - tagging and closing.
Comment 3 Bradley Morrison 2008-04-09 11:39:37 PDT
Bulk closing of all s60 platform bugs. 

Sorry for the noise!
Comment 4 Joel Parks 2011-03-21 11:53:38 PDT
re-purposing InTSW keyword for use by QtWebkit team