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

Handle corrupted generator or async generator prototype #6684

Merged
merged 1 commit into from
Apr 10, 2021

Conversation

rhuanjl
Copy link
Collaborator

@rhuanjl rhuanjl commented Apr 8, 2021

This PR fixes a fatal bug (abort at runtime) introduced by my previous fix to the handling of generator and async generator prototypes.

As well as fixing the abort this also brings behaviour for these cases in line with v8 and jsc. (The previously released version of chakra did not match them)

Fix: #6677

Copy link
Member

@ppenzin ppenzin left a comment

Choose a reason for hiding this comment

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

I will come back to this tomorrow. Does anything special need to happen if prototype is set to 0?

@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Apr 9, 2021

I will come back to this tomorrow. Does anything special need to happen if prototype is set to 0?

No though we can test if you like; the crash is for any non-object value type so the same for 1 as 0.

@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Apr 10, 2021

I'v added a couple of extra tests so we do 0 as well as 1 and also a string - the internal path is the same for these but thought best to have the test there to catch any future regression.

Copy link
Member

@ppenzin ppenzin left a comment

Choose a reason for hiding this comment

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

I'v added a couple of extra tests so we do 0 as well as 1 and also a string - the internal path is the same for these but thought best to have the test there to catch any future regression.

Sure, that is a good idea.

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

Successfully merging this pull request may close these issues.

AssertOrFailFast in Js::VarTo
2 participants