Changeset 98758 in webkit
- Timestamp:
- Oct 28, 2011, 1:46:29 PM (15 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/port/leakdetector.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r98753 r98758 1 2011-10-28 Eric Seidel <eric@webkit.org> 2 3 NRWT crashes when parsing leaks output due to UTF-8 decoding error 4 https://bugs.webkit.org/show_bug.cgi?id=71112 5 6 Reviewed by Adam Barth. 7 8 Use read_binary_file instead of read_text_file and add a test 9 case with some non-utf8 data to make sure we don't break this in the future. 10 11 * Scripts/webkitpy/layout_tests/port/leakdetector.py: 12 * Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py: 13 1 14 2011-10-28 David Levin <levin@chromium.org> 2 15 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/leakdetector.py
r98682 r98758 121 121 total_leaks = 0 122 122 for leak_file_path in leak_file_paths: 123 leaks_output = self._filesystem.read_text_file(leak_file_path) 123 # Leaks have been seen to include non-utf8 data, so we use read_binary_file. 124 # See https://bugs.webkit.org/show_bug.cgi?id=71112. 125 leaks_output = self._filesystem.read_binary_file(leak_file_path) 124 126 count, _, _ = self._parse_leaks_output(leaks_output) 125 127 total_leaks += count -
trunk/Tools/Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py
r98639 r98758 110 110 detector = self._make_detector() 111 111 detector._filesystem = MockFileSystem({ 112 '/mock-results/DumpRenderTree-1234-leaks.txt': 'Process 1234: 12 leaks for 40 total leaked bytes.\n', 112 # The \xff is some non-utf8 characters to make sure we don't blow up trying to parse the file. 113 '/mock-results/DumpRenderTree-1234-leaks.txt': '\xff\nProcess 1234: 12 leaks for 40 total leaked bytes.\n\xff\n', 113 114 '/mock-results/DumpRenderTree-23423-leaks.txt': 'Process 1235: 12341 leaks for 27934 total leaked bytes.\n', 114 115 '/mock-results/DumpRenderTree-823-leaks.txt': 'Process 12356: 23412 leaks for 18 total leaked bytes.\n',
Note:
See TracChangeset
for help on using the changeset viewer.