-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
ICU-21383 Fix memory problem in FormattedStringBuilder #1450
Conversation
FYI @hugovdm: a bug one can make when using MaybeStackArray: don't forget to pass the optional length parameter to the resize function! |
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.
Looks good to me, except that the C++ and Java unit tests have falling out of sync?
0abc025
to
59c85db
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
OK, I added the corresponding Java tests via amend. This was an ICU4C-specific bug, but it doesn't hurt to add the ICU4J tests, since it helps to keep the two unit test suites in sync, as you pointed out. |
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.
Please change the U_ASSERT condition to >
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.
Looks good to me. (The assert also made sense to me.)
The MSYS2 failure looks unrelated to this PR:
configure: error: in `/d/a/1/s/icu4c/source':
configure: error: no acceptable C compiler found in $PATH
Hmm.. I'll try to re-run the build again... |
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.
lgtm
473bb11
59c85db
to
473bb11
Compare
Thanks for all the reviews. However, I caught two mistakes which I fixed in another amendment:
Please re-review. |
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Note: The Jira-GitHub bot seems to have been down for a time. I manually re-sent the webhook request, which is why it was delayed. |
The fix to the reported issue, a list with more than 8 elements, is the addition of an argument to the
.resize()
call inappendSpanInfo
. The other fix, at the bottom ofnextPositionImpl
, came up in Valgrind during testing and is triggered when calling.nextPosition()
repeatedly after it has returned false.Checklist