-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(couchjs): add support for SpiderMonkey 91esr #3842
Conversation
I don't see how the erlfdb test failure relates to the PR. If this is from fdb errors it is |
@lostnet Thanks for your contribution! I believe you just hit a spurious bug in erlfdb. That when we generate random keys and value to add but forgot guard against writing to \xFF range. I had created an issue to fix it apache/couchdb-erlfdb#46 Re-triggered your PR and now it passed |
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.
Thanks for this contribution! It seems like we might need to modify some project configuration for the Action to show up, but I don't want that to block the merge of this PR.
@@ -330,7 +330,7 @@ void | |||
couch_oom(JSContext* cx, void* data) | |||
{ | |||
fprintf(stderr, "out of memory\n"); | |||
exit(1); | |||
_Exit(1); |
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.
Is this change something that ought to be backported to our wrappers for older versions of SpiderMonkey, or is it motivated by something specific in ESR91?
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.
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.
Overview
This PR introduces spidermonkey 91esr. As with 78 and 86 there are no relevant API changes but it became necessary in practice as well as in theory to destroy the context and shutdown JS before any proper exit to prevent assertions in destructors. (For more information, the issue tracking the esr91 migration guide is here
Testing recommendations
Since many distributions don't ship with moz-js 91 yet, I've included a github workflow to test couchdb in ubuntu with the latest spidermonkey, foundationdb 6.x, and icu. It is set to be manually run on a branch from the actions menu.
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.ini
1Footnotes
no configurable parameters for runtime ↩
spidermonkey versions are only referenced in whatsnew for release branches. ↩