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

src: set thread local env in CreateEnvironment #18573

Closed
wants to merge 5 commits into from

Commits on Feb 13, 2018

  1. src: set thread local env in CreateEnvironment

    This commit set the Environment as a thread local when CreateEnvironment
    is called which is currently not being done. This would lead to a
    segment fault if later node::AtExit is called without specifying the
    environment parameter. This specific issue was reported by Electron.
    
    If I recall correctly, back when this was implemented the motivation was
    that if embedders have multiple environments per isolate they should be
    using the AtExit functions that take an environment. This is not the
    case with Electron which only create a single environment (as far as I
    know), and if a native module calls AtExit this would lead to the
    segment fault.
    
    I was able to reproduce Electron issue and the provided test simulates
    it. I was also able to use this patch and verify that it works for the
    Electron issue as well.
    
    Refs: nodejs#9163
    Refs: electron/electron#11299
    danbev committed Feb 13, 2018
    Configuration menu
    Copy the full SHA
    c2ae326 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e047cb0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6dee9c8 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2018

  1. Configuration menu
    Copy the full SHA
    3bceaee View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2018

  1. Configuration menu
    Copy the full SHA
    b5761a7 View commit details
    Browse the repository at this point in the history