Skip to content

src: fix addon loader regression #154

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 13, 2014

Conversation

bnoordhuis
Copy link
Member

Fix a regression that was introduced in commit a38b917 by removing the
bad check. Also rearrange the addon loading logic to ensure that the
list of pending addons remains in a consistent state when the shared
object fails to load; in particular, when an addon self-registers first,
then hits a dynamic linker error in a later constructor.

Fixes the following asserting when loading a .node shared object:

node: ../src/node.cc:1944: void node::node_module_register(void*):
Assertion `(modpending) != (nullptr)' failed.

Fixes strongloop/strongops#233.

R=@trevnorris

@bnoordhuis
Copy link
Member Author

@trevnorris Let me know if you want me to split it into two commits.

Also, /cc @rmg.

@rmg
Copy link
Contributor

rmg commented Dec 13, 2014

👍

@rmg
Copy link
Contributor

rmg commented Dec 13, 2014

oh, and LGTM :-)

Fix a regression that was introduced in commit a38b917 by removing the
bad check.  Also rearrange the addon loading logic to ensure that the
list of pending addons remains in a consistent state when the shared
object fails to load; in particular, when an addon self-registers first,
then hits a dynamic linker error in a later constructor.

Fixes the following asserting when loading a .node shared object:

    node: ../src/node.cc:1944: void node::node_module_register(void*):
    Assertion `(modpending) != (nullptr)' failed.

Fixes strongloop/strongops#233.

PR-URL: nodejs#154
Reviewed-By: Ryan Graham <ryan@strongloop.com>
@bnoordhuis bnoordhuis force-pushed the fix-addon-loader-regression branch from 2e67fac to a60056d Compare December 13, 2014 22:08
@bnoordhuis bnoordhuis merged commit a60056d into nodejs:v0.12 Dec 13, 2014
@bnoordhuis bnoordhuis deleted the fix-addon-loader-regression branch December 13, 2014 22:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants