-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak on corrupt unicode character
See the added test. When a corrupt unicode character is received, mtail did not process the following logs but kept them in memory. With this commit RuneErrors on parsing unicode characters are ignored when there are enough characters after it in the buffer. This keeps the functionality intact that bytes that gave a RuneError are being reparsed, but with a larger buffer, to not break unicode characters which were split in half from the buffered reading on the logfile being read. The issue was introduced in v3.0.0-rc50
- Loading branch information
1 parent
060a830
commit 6d127f3
Showing
2 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters