os,contextify: fix segfaults and CHECK failure#12371
os,contextify: fix segfaults and CHECK failure#12371tniessen wants to merge 3 commits intonodejs:masterfrom
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? |
| 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.
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.
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.
(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 |
|
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 <anna@addaleax.net>
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