Skip to content

Data Corruption caused by NS 8.1 PR #127 #131

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

Closed
NathanaelA opened this issue Nov 9, 2021 · 7 comments
Closed

Data Corruption caused by NS 8.1 PR #127 #131

NathanaelA opened this issue Nov 9, 2021 · 7 comments

Comments

@NathanaelA
Copy link
Contributor

@rigor789 @darind - There appears to be a corner case bug if the string passed in is "" (empty). Only occurs with NS 8.1 runtime, and we tracked it down to empty string being passed in. I figured out a work around in my case, but the issue is definitely something in the 8.1 runtime as 8.0 works great. My guess is the #127 here is causing the issue as it probably is NOT creating a null terminated 0 length string properly (i.e. the string I believe should technically be 1 character, a single null character).

@darind
Copy link
Collaborator

darind commented Nov 9, 2021

@NathanaelA, can you please provide a sample javascript illustrating the issue?

@NathanaelA

This comment was marked as abuse.

@darind
Copy link
Collaborator

darind commented Nov 11, 2021

@NathanaelA, #132 should address this issue.

@NathanaelA

This comment was marked as abuse.

@darind
Copy link
Collaborator

darind commented Nov 11, 2021

@NathanaelA, this PR adjusts the string length passed to v8’s ExternalString accounting for the null terminating character. So for example, the length of the empty string should be 1 instead of 0.

@NathanaelA

This comment was marked as abuse.

@NathanWalker
Copy link
Contributor

Thanks @darind, #132 published in 8.2.0-alpha.0 - Upon confirmation this issue can be closed and will be included with 8.2 in coming weeks.

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

No branches or pull requests

3 participants