Status: New
Owner: ----
New issue 3878 by [email protected]: RangeError running RegExp on large string
https://code.google.com/p/v8/issues/detail?id=3878
Platform: OS X 10.10.2
Engine: iojs 1.1.0
Here's code that triggers it on my system:
```
var patt = /(?:\/\/|\/\*)[@#][ \t]+sourceMappingURL=data:(?:application|
text)\/json;base64,((?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|
[A-Za-z0-9+\/]{3}=)?)(?:[ \t]*\*\/)?$/mg;
var source = '//# sourceMappingURL=data:application/json;base64,'
var len = 4473955 // <= tried different numbers; this seems to be the
threshold
while (source.length < len){
source += 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}
source = source.substring(0,len)
patt.test(source)
```
Here's the output:
```
$ node test.js
/Users/greim/deleteme/test.js:5
source += 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
^
RangeError: Maximum call stack size exceeded
at RegExp.test (native)
at Object.<anonymous> (/Users/greim/deleteme/test.js:8:6)
at Module._compile (module.js:446:26)
at Object.Module._extensions..js (module.js:464:10)
at Module.load (module.js:341:32)
at Function.Module._load (module.js:296:12)
at Function.Module.runMain (module.js:487:10)
at startup (node.js:111:16)
at node.js:799:3
```
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.