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

The heap is not expanded when its max size is reached #797

Closed
pieter-v opened this issue Apr 12, 2018 · 1 comment
Closed

The heap is not expanded when its max size is reached #797

pieter-v opened this issue Apr 12, 2018 · 1 comment
Labels

Comments

@pieter-v
Copy link

The heap uses a TypedArray as its data buffer.

this.heap = new Uint16Array(0x100000);

If something is pushed on the heap, then there is no size checking:

push(item: number): void {
    this.heap[this.offset++] = item;
}

A TypedArray doesn't expand its buffer when the maximum size is reached and it doesn't throws an error when you write outside its buffer.

This probably causes the error reported in emberjs/ember.js#16503

@rwjblue
Copy link
Member

rwjblue commented Apr 12, 2018

Thank you for reporting @pieter-v!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants