You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, It will show me an unexpected result and crashed
Regex error: The expression contained an invalid escaped character, or a trailing escape.
Finally, I found the bug in src/binding.cc
Glob::Glob(std::string raw) {
mRaw = raw;
mHash = std::hash<std::string>()(raw);
#ifndef __wasm32__
mRegex = std::regex(raw);
#endif
}
// something else
std::unordered_set<Glob> getIgnoreGlobs(Env env, Value opts) {
std::unordered_set<Glob> result;
if (opts.IsObject()) {
Value v = opts.As<Object>().Get(String::New(env, "ignoreGlobs"));
if (v.IsArray()) {
Array items = v.As<Array>();
for (size_t i = 0; i < items.Length(); i++) {
Value item = items.Get(Number::New(env, i));
if (item.IsString()) {
auto key = item.As<String>().Utf8Value();
// This line will throw regex error when key don't match the regex rule.
result.emplace(key);
}
}
}
}
return result;
}
Now, I try to solve this bug.
The text was updated successfully, but these errors were encountered:
effectivecui
changed the title
ignoreGlobs will make the process of node crash when use some path on windows 11 23H
Using certain paths on Windows 11 23H, ignoreGlobs may cause the Node process to crash.
Nov 27, 2024
effectivecui
changed the title
Using certain paths on Windows 11 23H, ignoreGlobs may cause the Node process to crash.
Using certain paths on Windows 11 23H2, ignoreGlobs may cause the Node process to crash.
Nov 27, 2024
effectivecui
changed the title
Using certain paths on Windows 11 23H2, ignoreGlobs may cause the Node process to crash.
Using certain paths, ignoreGlobs may cause the Node process to crash.
Nov 27, 2024
effectivecui
changed the title
Using certain paths, ignoreGlobs may cause the Node process to crash.
Crash Bug: Using certain paths, ignoreGlobs may cause the Node process to crash.
Nov 27, 2024
For example, I run this code snippet using nodejs 16
Then, It will show me an unexpected result and crashed
Finally, I found the bug in
src/binding.cc
Now, I try to solve this bug.
The text was updated successfully, but these errors were encountered: