Skip to content
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

fix: fix exception leak cause globalObject not fully freed. #1117

Merged
merged 5 commits into from Jan 20, 2022

Conversation

andycall
Copy link
Member

Fixed #1099

没有释放的 Exception 会导致 globalObject 没有被释放,globalObject 没有释放会导致 GC Tracker 没有释放,GC tracker 没有释放会导致当销毁一个 ExecutionContext 时,基于 JSContext 所创建的对象并没有完全被清空,依然会残留在 GC 的队列里。

待下次执行 GC 的时候,就从没有被回收的对象访问到已经被释放的 JSContext,导致 Crash。

TODO: test

answershuto
answershuto previously approved these changes Jan 19, 2022
@wssgcg1213
Copy link
Member

看懂了, 对应测试还是需要补一下

@fadeAce
Copy link

fadeAce commented Jan 19, 2022

之后如果还有问题,我就直接fork master出来,把test案例集成到kraken/example,方便大家测试吧

@answershuto answershuto merged commit 6e8e66c into main Jan 20, 2022
@answershuto answershuto deleted the fix/exception_leak branch January 20, 2022 02:42
@fadeAce
Copy link

fadeAce commented Jan 20, 2022

已测试,完美

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSGC的EXC_BAD_ACCESS问题
5 participants