Skip to content

Add length check to ecma_builtin_array_prototype_object_slice#3481

Merged
rerobika merged 1 commit intojerryscript-project:masterfrom
pmarkee:issue-3479
Jan 10, 2020
Merged

Add length check to ecma_builtin_array_prototype_object_slice#3481
rerobika merged 1 commit intojerryscript-project:masterfrom
pmarkee:issue-3479

Conversation

@pmarkee
Copy link
Copy Markdown
Contributor

@pmarkee pmarkee commented Jan 2, 2020

Fixes #3479

JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu

@rerobika rerobika added the bug Undesired behaviour label Jan 2, 2020
Copy link
Copy Markdown
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

LaszloLango
LaszloLango previously approved these changes Jan 3, 2020
Copy link
Copy Markdown
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c
@pmarkee
Copy link
Copy Markdown
Contributor Author

pmarkee commented Jan 8, 2020

Thanks for the review @dbatyai , I have updated the PR.

Copy link
Copy Markdown
Member

@dbatyai dbatyai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hole count of the result array should also be fixed (on line 890). We should reset it to zero by masking it.

Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c Outdated
Comment thread jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c Outdated
Fixes #3479

JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
Copy link
Copy Markdown
Member

@dbatyai dbatyai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbatyai dbatyai requested a review from LaszloLango January 10, 2020 10:18
Copy link
Copy Markdown
Member

@rerobika rerobika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

@rerobika rerobika merged commit 08da8bc into jerryscript-project:master Jan 10, 2020
@pmarkee pmarkee deleted the issue-3479 branch December 4, 2020 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Undesired behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion old_length < new_length in ecma_fast_array_extend

4 participants