Skip to content

src: fix addon loader regression#154

Merged
bnoordhuis merged 1 commit into
nodejs:v0.12from
bnoordhuis:fix-addon-loader-regression
Dec 13, 2014
Merged

src: fix addon loader regression#154
bnoordhuis merged 1 commit into
nodejs:v0.12from
bnoordhuis:fix-addon-loader-regression

Conversation

@bnoordhuis
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

Also, /cc @rmg.

@rmg
Copy link
Copy Markdown
Contributor

rmg commented Dec 13, 2014

👍

@rmg
Copy link
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants