-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix XML parsing in WASI environment #4683
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
Fix XML parsing in WASI environment #4683
Conversation
Final chunk of XML document was being skipped when parsing when in a WASI environment
@swift-ci please test |
CC: @MaxDesiatov |
@swift-ci please test |
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.
Would be great to cover this with a test, but I'm not sure we have testing infrastructure for WASI in this repository. Otherwise seems legit.
@swift-ci test macOS |
I can't quite tell from the output of the macOS action- Are there legitimate test failures I need to address? |
The test failure seems unrelated to me, but I requested at least one more review just in case. |
@swift-ci please test macOS platform |
1 similar comment
@swift-ci please test macOS platform |
if chunkStart >= data.count || chunkEnd >= data.count { | ||
break | ||
} | ||
while result && chunkStart != chunkEnd { |
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.
This looks safe based on reading the code below. One reason why I personally stick with < checks in places like this instead of != is that if a later change or some missed path advances beyond the end, we fail safely instead of entering an infinite loop.
@swift-ci please test |
Final chunk of XML document was being skipped when parsing when in a WASI environment