-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
remove the use of String's len field (introduced in #22133) #22756
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings shouldn't be mutated like this. Use StringVector
instead.
I went ahead and canceled a bunch of CI runs on AppVeyor and Travis, since nothing will pass until this gets through. |
This must mean there are no tests for this function? Could you add some? |
I see, I guess there are tests. I didn't realize this code changed so recently. |
I thougth this was the purpose of |
dda1b77
to
ba16e8b
Compare
replaced |
ba16e8b
to
7525b08
Compare
7525b08
to
770ad1e
Compare
@rfourquet, thanks for taking the lead on this. These kinds of "distributed errors" aren't anyone's fault and are unavoidable when changes are happening at a rate that exceeds individual-human bandwidth. Having someone who takes ownership and deals with it so quickly is simply priceless. |
The
len
field has been removed in 2b47865.I assume here that
jl_alloc_string
(called by_string_n
) reserves one char more for\0
that some library will insert, as far as I can understand its code (it seemslen+1
bytes are allocated, wherelen
is the requested size, the last byte being zeroed).