RegExp('matchthis', undefined); RegExp('matchthis', 'undefined'); var re = new RegExp('matchthis', undefined); var re = new RegExp('matchthis', 'undefined'); All of these currently cause a segfault in JS Engine. My understanding is that per ECMA, passing undefined as the 2nd parameter should be equivalent to not providing the parameter at all. I don't know about passing the string 'undefined' - it seems to me it should be treated as an invalid flag value (e.g. like passing 'a' as a flag). Or should it be the same as passing the value undefined? At any rate, it shouldn't segfault -
Generated a meta bug to capture all current R.E. bugs.
Fix checked in.
Verified Fixed - ran this test suite directory on Linux, WinNT, and Mac js/tests/ecma_3/RegExp/ with both debug and optimized versions of the JS shell, and got 0 errors.