Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

cluster: only assign debug port if in valid range. #14816

Closed
wants to merge 2 commits into from

Commits on Apr 13, 2015

  1. cluster: only assign debug port if in valid range.

    See: nodejs#8159
    
    Per above discussion, cluster.fork() currently sends --debug-port to
    forked processes regardless of whether debug is enabled, and more
    importantly, without any bounds checking. This will rather unexpectedly
    crash any Node process that forks enough times.
    
    This patch simply bounds checks --debug-port and doesn't set arg if out
    of bounds (V8 requires 1024 < debug-port < 65535). This will prevent
    surprises to callers of cluster.fork() while waiting for the debug part
    of node to be rewritten as mentioned in issue discussion above.
    mjseidel committed Apr 13, 2015
    Configuration menu
    Copy the full SHA
    c8f6056 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2015

  1. Change conditional to match syntax in node.cc:2903

    Additionally, fix previous commit's bug of disallowing 1024 and 65535,
    which are legal debug ports.
    mjseidel committed Apr 15, 2015
    Configuration menu
    Copy the full SHA
    3de2ae9 View commit details
    Browse the repository at this point in the history