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

util: limit inspection output size to 128 MB #22756

Closed
wants to merge 5 commits into from

Commits on Sep 8, 2018

  1. util: limit inspection output size to 128 MB

    The maximum hard limit that `util.inspect()` could theoretically handle
    is the maximum string size. That is ~2 ** 28 on 32 bit systems and
    ~2 ** 30 on 64 bit systems.
    
    Due to the recursive algorithm a complex object could easily exceed
    that limit without throwing an error right away and therefore
    crashing the application by exceeding the heap limit.
    
    `util.inspect()` is fast enough to compute 128 MB of data below one
    second on an Intel(R) Core(TM) i7-5600U CPU. This hard limit allows
    to inspect arbitrary big objects from now on without crashing the
    application or blocking the event loop significantly.
    BridgeAR committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    dbb2b1a View commit details
    Browse the repository at this point in the history
  2. fixup: address comment

    BridgeAR committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    8742df1 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2018

  1. fixup: add comment

    BridgeAR committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    b1cb015 View commit details
    Browse the repository at this point in the history
  2. fixup: address comment

    BridgeAR committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    e133551 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2018

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