-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex causes ChakraCore to exit process #4538
Comments
@dilijev ? |
@rodrigoamicrosoft which version of ChakraCore.dll are you using? (And for completeness re: version of Chakra.dll which build of Windows are you on? i.e. as seen from Are you hosting ChakraCore.dll and just calling RunScript on that snippet? Did you then attempt to call the function you created or did it crash first? Can you repro in any version of ch.exe? The closest thing I have to a repro[1] of this behavior is an overzealous FailFast[2], as we considered a certain regex compilation path to be a fatal unrecoverable state. This logic was only problematic in certain versions of release/1.8 between 2017-10 and 2017-12. No version of release/1.7 had this issue. In particular I have a repro[1] from debug and release builds of 03a34a9 We have since fixed the underlying issue so that this FailFast check should not fire anymore. The latest builds from release/1.8 would not have this issue, if this FailFast is the root cause. The FailFast was added here: #3924 /cc @Penguinwizzard [1] I had to escape the slash at the end of the regex because as written it parses as |
Removed External Contributor tag because this is not a PR. |
Sounds like this is either fixed (FailFast mentioned above) or repros only in ChakraCore.dll (not Chakra.dll), so not a priority for release/1.8. I will continue to investigate and, if deemed a high priority, will escalate. |
@rodrigoamicrosoft could you confirm whether your issue repros in the latest builds? |
@rodrigoamicrosoft Feel free to reopen this issue if you confirm that this still repros. |
Calling RunScript on the following JavaScript causes ChakraCore to exit the process, no exception is thrown. If "x2|" is removed from the regex the issue does not repro. This script works correctly on Chakra.dll
var f = function (x) { var str = " droid24gP xh06build/"; var reg = /\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build//i; return str.search(reg); }
The text was updated successfully, but these errors were encountered: