Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Lock spidermonkey_drv.so in memory so NSPR thread cleanup code runs.

Fixes SEGV under R15B
  • Loading branch information...
commit 11557daaec63db3fab270ba5293e38abf3efc135 1 parent 8006549
Jon Meredith jonmeredith authored

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +7 0 c_src/spidermonkey_drv.c
7 c_src/spidermonkey_drv.c
@@ -193,6 +193,13 @@ static ErlDrvData start(ErlDrvPort port, char *cmd) {
193 193 retval->atom_ok = driver_mk_atom((char *) "ok");
194 194 retval->atom_error = driver_mk_atom((char *) "error");
195 195 retval->atom_unknown_cmd = driver_mk_atom((char *) "unknown_command");
  196 +
  197 + /* Lock the driver in memory. NSPR registers some thread cleanup
  198 + ** code in _pt_thread_death on the async thread pool which
  199 + ** gets called after spidermonkey_drv.so is unloaded on R15B
  200 + */
  201 + driver_lock_driver(port);
  202 +
196 203 return (ErlDrvData) retval;
197 204 }
198 205

0 comments on commit 11557da

Please sign in to comment.
Something went wrong with that request. Please try again.