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

Lower buffer.constants.MAX_STRING_LENGTH in 14.4.0 #33960

Closed
RickGroenewegen opened this issue Jun 19, 2020 · 2 comments
Closed

Lower buffer.constants.MAX_STRING_LENGTH in 14.4.0 #33960

RickGroenewegen opened this issue Jun 19, 2020 · 2 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@RickGroenewegen
Copy link

RickGroenewegen commented Jun 19, 2020

  • Version: 14.4.0
  • Platform: Ubuntu & Mac
  • Subsystem: N/A

What steps will reproduce the bug?

I upgraded from 12.18.1 to 14.4.0 and noticed the maximum string length (MAX_STRING_LENGTH) decreasing from 1073741799 to 536870888. Seems like a regression described in: #31653

My architecture is a 64-bit build which I've checked with 'node -p "process.arch"'

v.12.18.1

require('buffer').constants.MAX_STRING_LENGTH; // =1073741799

v.14.4.0

require('buffer').constants.MAX_STRING_LENGTH; // = 536870888

@addaleax addaleax added the v8 engine Issues and PRs related to the V8 dependency. label Jun 19, 2020
@addaleax
Copy link
Member

This is coming from an upstream change in V8, as a side effect of them modifying their code to enable pointer compression (even though the default Node.js build does not use pointer compression). I don’t think there’s anything in particular that we can do about it on the Node.js side.

@addaleax
Copy link
Member

I’ll close this given that there doesn’t seem to be anything that we can do about this, sorry.

Seems like a regression described in: #31653

My understanding is that V8 accidentally lowered the value more than they intended to (from ~1 GB to ~256 MB instead of ~512 MB), but that the new limit of 512 MB is what we have to live with now.

angerman added a commit to input-output-hk/haskell.nix that referenced this issue Nov 14, 2021
Use nodejs-12_x, to allow larger strings to be loaded. See nodejs/node#33960
angerman added a commit to input-output-hk/haskell.nix that referenced this issue Nov 14, 2021
Allow large strings, see nodejs/node#33960
hamishmack added a commit to input-output-hk/haskell.nix that referenced this issue Nov 16, 2021
* Update ghcjs810-src.json

* Update ghcjs-project.nix

* Update ghcjs.nix

Use nodejs-12_x, to allow larger strings to be loaded. See nodejs/node#33960

* Update comp-builder.nix

Allow large strings, see nodejs/node#33960

* Update cabal-os-arch-comp.nix

* Update ghcjs-src

* Update ghcjs ref

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
booniepepper pushed a commit to booniepepper/haskell.nix that referenced this issue Feb 4, 2022
* Update ghcjs810-src.json

* Update ghcjs-project.nix

* Update ghcjs.nix

Use nodejs-12_x, to allow larger strings to be loaded. See nodejs/node#33960

* Update comp-builder.nix

Allow large strings, see nodejs/node#33960

* Update cabal-os-arch-comp.nix

* Update ghcjs-src

* Update ghcjs ref

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

2 participants