lostnet commented on a change in pull request #3842:
URL: https://github.com/apache/couchdb/pull/3842#discussion_r761202765
##########
File path: src/couch/priv/couch_js/86/util.cpp
##########
@@ -330,7 +330,7 @@ void
couch_oom(JSContext* cx, void* data)
{
fprintf(stderr, "out of memory\n");
- exit(1);
+ _Exit(1);
Review comment:
It is a little of both something that changed and a bug that existed..
Technically it was never correct to do a proper exit() without cleaning up the
js context which we can't do in the middle of being called from the js context
(and having a shortage of memory its risky to assume we can get a chance to
exit later), but it was only in recent versions that mozilla added destructors
that notice they are being called with a still active context.
Since it was a bug I saw no problem with keeping it combined and fixing 86
and 78 in the process, but none of the earlier versions should ever get patches
again so it probably doesn't need to be backported to the earlier wrappers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]