| Summary: | Out of memory parsing a large binary file to check if it is a patch file | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Chris McGee <cbmcgee> |
| Component: | Team | Assignee: | Platform Team Inbox <platform-team-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | remy.suen, tomasz.zarna |
| Version: | 3.5.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
|
Description
Chris McGee
(In reply to comment #0) > the parser should fail gracefully when the buffer exceeds a certain size. Do you have any specific size in mind? The parser can handle larger files if you adjust JVM memory settings, but it won't help much if you're trying to parse a binary file. I think a better approach would be to abort as soon as we realize we're dealing with a binary. However, you will still get in trouble if you try to parse a proper patch as large as the binary. Perhaps if there is an extremely large line it could be a clue that it is a binary file. Maybe it is unrealistic for a line to exceed something like 1MB. (In reply to comment #2) > Perhaps if there is an extremely large line it could be a clue that it is a > binary file. Maybe it is unrealistic for a line to exceed something like 1MB. Yup, we do a similar thing when guessing type in org.eclipse.compare.internal.CompareUIPlugin.guessType(ITypedElement). If any of the first 10 lines is longer than 1000 bytes we assume the input is not a text file. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |