Repository navigation
Node.js 12.x need to cherry-pick https://github.com/nodejs/node/pull/37616 #42376
Description
Activity
I have written a 100% reproducible case here: yisibl/svg-sprite#3
> mocha "test/**/*.test.js" calculateSvgDimensions ✔ should return the expected dimensions from 46x46 fixture 1 passing (41ms) [1] 10147 segmentation fault npm test
- addednode-apiIssues and PRs related to Node-API.Issues and PRs related to Node-API.
on Mar 17, 2022 Node.js 12.x support ends in about 6 weeks and it is in maintenance mode where it mostly only gets security fixes. So this may not happen. However, the decision of what goes into releases and when is up to the releasers to let's ping them: @nodejs/releasers
@richardlau I see you having volunteered for likely a final release of 12.x on 2022-04-05, I assume that would be the last opportunity to get something like this in, right?
@legendecas is going to post the list of related PR's that would also need to be cherry-picked because we believe there are a couple more that would need to go along with this.
Reacted by Chengzhong Wu, LongYinan, Andrew and Yisi@richardlau I see you having volunteered for likely a final release of 12.x on 2022-04-05, I assume that would be the last opportunity to get something like this in, right?
Correct. That is planned to be the last release of Node.js 12.x. I'm planning to put together a release proposal next week to give roughly a week to review.
Reacted by YisiThe related PRs of this problem are:
Manually backported to v14.x (Backport PR: #37802):
- node-api: force env shutdown deferring behavior node-api: force env shutdown deferring behavior #37303
- node-api: stop ref gc during environment teardown node-api: stop ref gc during environment teardown #37616
- node-api: fix crash in finalization node-api: fix crash in finalization #37876
Clean land on v14.x:
- node-api: make reference weak parameter an indirect link to references node-api: make reference weak parameter an indirect link to references #38000
- src: fix finalization crash src: fix finalization crash #38250
- node-api: fix shutdown crashes node-api: fix shutdown crashes #38492
- node-api: avoid SecondPassCallback crash node-api: avoid SecondPassCallback crash #38899
- node-api: refactor to cctest v8impl::Reference node-api: refactor to cctest v8impl::Reference #38970
So to v12.x, we may need to backport the above PRs to fix the problem.
Reacted by YisiThe backports were released in Node.js 12.22.12.
Reacted by Andrew and YisiReacted by XhmikosR and Yisi
Version
v12.22.11
Platform
Windows x64/macOS x64/Linux x64
Subsystem
No response
What steps will reproduce the bug?
No response
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
Native addon uses
napi_wrapcrash on Node.js 12x while process exiting.svg-sprite/svg-sprite#606
Additional information
No response