Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 1472 by [email protected]: RegExp causes OOM
http://code.google.com/p/v8/issues/detail?id=1472

The following JavaScript causes an OOM as the code generated for the RegExp is 197322399 bytes of instructions.

var r = /^((?:(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4})|(?:[a-f0-9]{1,4}::)| (?::(?::[a-f0-9]{1,4}){1,6})|(?:(?:[a-f0-9]{1,4}:){1,6}:)| (?:(?:[a-f0-9]{1,4}:)(?::[a-f0-9]{1,4}){1,6})| (?:(?:[a-f0-9]{1,4}:){2}(?::[a-f0-9]{1,4}){1,5})| (?:(?:[a-f0-9]{1,4}:){3}(?::[a-f0-9]{1,4}){1,4})| (?:(?:[a-f0-9]{1,4}:){4}(?::[a-f0-9]{1,4}){1,3})| (?:(?:[a-f0-9]{1,4}:){5}(?::[a-f0-9]{1,4}){1,2})| (?:(?:[a-f0-9]{1,4}:){6}(?::[a-f0-9]{1,4})))$/i

"xxx".match(r);

Script attached as well.

This was reported through the Chromium bug tracker: http://code.google.com/p/chromium/issues/detail?id=85505

Attachments:
        regexp_oom.js  435 bytes

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to