-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
os,contextify: fix segfaults and CHECK failure #12371
Conversation
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: nodejs#12369 Fixes: nodejs#12370
Request: Add a test? |
src/node_contextify.cc
Outdated
Local<Value> value = options.As<Object>()->Get(key); | ||
return value->IsTrue(); | ||
MaybeLocal<Value> maybeValue = | ||
options.As<Object>()->Get(env->context(), key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe maybe_value
? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node_contextify.cc
is pretty inconsistent about this, even within functions 😞 By the way, why don't we have linting for variable names?
If you prefer, I will change it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, why don't we have linting for variable names?
I guess it’s mostly because there are only a handful of people contributing to the C++ sources on a regular basis, so adding linter rules comes with a disproportionate overhead when compared to e.g. the JS sources…
If you prefer, I will change it :)
I don’t care much personally, but I’d bet @bnoordhuis is going to request it. 😄
src/node_contextify.cc
Outdated
MaybeLocal<Value> maybeValue = | ||
options.As<Object>()->Get(env->context(), | ||
env->produce_cached_data_string()); | ||
if (maybeValue.IsEmpty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ditto everywhere, you may want to search+replace for maybeValue
)
@Trott Thank you, done. |
Thanks Anna, CI is green 😃 |
Thanks, landed in 88aab45. I noticed while landing that the commit message had the subsystem |
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: #12369 Fixes: #12370 PR-URL: #12371 Reviewed-By: Anna Henningsen <[email protected]>
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: #12369 Fixes: #12370 PR-URL: #12371 Reviewed-By: Anna Henningsen <[email protected]>
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: #12369 Fixes: #12370 PR-URL: #12371 Reviewed-By: Anna Henningsen <[email protected]>
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: #12369 Fixes: #12370 PR-URL: #12371 Reviewed-By: Anna Henningsen <[email protected]>
Should this land on v6.x??? It isn't landing cleanly and will require a manual backport if so |
That's up to you folks, I think bug fixes should be welcome in LTS versions, but this is not an urgent fix. I don't know how much more work it would take, I would be happy to help though (if I can). If you decide that inclusion in v6.x is not worth the additional efforts, that's fine by me. |
If you're willing to backport to |
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: nodejs#12369 Fixes: nodejs#12370 PR-URL: nodejs#12371 Reviewed-By: Anna Henningsen <[email protected]>
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: #12369 Fixes: #12370 Backport-PR-URL: #13871 PR-URL: #12371 Reviewed-By: Anna Henningsen <[email protected]>
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc Fixes: #12369 Fixes: #12370 Backport-PR-URL: #13871 PR-URL: #12371 Reviewed-By: Anna Henningsen <[email protected]>
Fixes multiple possible segmentation faults in node_contextify.cc and an assertion failure in node_os.cc
Fixes: #12369
Fixes: #12370
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
os, vm, contextify