Skip to content

Conversation

@robertsipka
Copy link
Contributor

@robertsipka robertsipka commented Feb 2, 2018

@DanielBallaSZTE : This bug is appeared after your PR (#2191). Please check that this patch covers your original intent.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
@zherczeg
Copy link
Member

zherczeg commented Feb 2, 2018

I think the issue is not "avoiding an uninitialized variable", but the code was simply wrong. So please change the description. Also pleas add test case since it seems this is not tested.

@robertsipka
Copy link
Contributor Author

robertsipka commented Feb 2, 2018

I think both. The code was wrong, but it also allowed that if the first part of the condition is false then the uninitialized value of the code_unit is used. Besides that, I agree with you, I will rename it, and add test cases also.

@zherczeg
Copy link
Member

zherczeg commented Feb 6, 2018

Please add a test case. I think an eval should do it.

@robertsipka
Copy link
Contributor Author

@zherczeg : Sorry for the late response. I've looked over it and actually I do not know what to check that we have not checked yet. The jerry returns with SyntaxError in case of invalid unicode escape sequence, which is an expected behaviour. In #2191, a test case has already added which covers the #2180 and #2192 issues, but it was a wrong and a partial fix, the problem is still exist in some cases without this patch, e.g. the following input : JSON.parse('"' + '\\u23'); will cause the same issue in the current master. Should I add another test with the input above?

@robertsipka
Copy link
Contributor Author

#2201 also fixes this bug, so I am closing this PR.

@robertsipka robertsipka deleted the avoid_unitialized_variable branch October 27, 2021 11:07
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.

2 participants