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

Backport 9815 & 10161 to v6.x #11176

Closed

Commits on Feb 5, 2017

  1. buffer: convert offset & length to int properly

    As per ecma-262 2015's #sec-%typedarray%-buffer-byteoffset-length,
    `offset` would be an integer, not a 32 bit unsigned integer. Also,
    `length` would be an integer with the maximum value of 2^53 - 1, not a
    32 bit unsigned integer.
    
    This would be a problem because, if we create a buffer from an
    arraybuffer, from an offset which is greater than 2^32, it would be
    actually pointing to a different location in arraybuffer. For example,
    if we use 2^40 as offset, then the actual value used will be 0,
    because `byteOffset >>>= 0` will convert `byteOffset` to a 32 bit
    unsigned int, which is based on 2^32 modulo.
    
    This is a redo, as the ca37fa5 broke
    CI.
    
    Refer: nodejs#9814
    Refer: nodejs#9492
    
    PR-URL: nodejs#9815
    
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    thefourtheye committed Feb 5, 2017
    Configuration menu
    Copy the full SHA
    7a21190 View commit details
    Browse the repository at this point in the history
  2. test: move long-running test to sequential

    test-buffer-creation-regression is flaky on some SmartOS hosts in CI,
    timing out. Move to sequential so it does not compete with other tests
    for resources. Reduce three test cases to just the one needed to
    identify the regression.
    
    PR-URL: nodejs#10161
    Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Italo A. Casas <me@italoacasas.com>
    Trott authored and thefourtheye committed Feb 5, 2017
    Configuration menu
    Copy the full SHA
    b878aeb View commit details
    Browse the repository at this point in the history