Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327738

Summary: edc - handle TCF IMemoryError.ErrorOffset status correctly in MemoryCache.readBlock()
Product: [Tools] CDT Reporter: Kirk Beitz <kirk.beitz>
Component: cdt-debug-edcAssignee: Ken Ryall <ken.ryall>
Status: RESOLVED WONTFIX QA Contact: Ken Ryall <ken.ryall>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 7.0.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
MemoryCache.java rev. 1.9 patch to fix readBlock() algorithm regarding BYTE_UNKNOWN status none

Description Kirk Beitz CLA 2010-10-14 03:16:16 EDT
Created attachment 180855 [details]
MemoryCache.java rev. 1.9 patch to fix readBlock() algorithm regarding BYTE_UNKNOWN status

until revision 1.8 of MemoryCache.java. readBlock() was implemented to attempt to interpret the status of a TCF IError.ErrorOffset on a per-byte basis.

but the code up to that revision incorrectly handled the case of a buffer whose entire contents had the status decoration BYTE_UNKNOWN … which TCF means to be interpreted differently than BYTE_INVALID.  the former is meant to indicate that it is not known if the memory at a particular location could not be retrieved, only that the entire block read may have failed.

ken ryall committed an interim fix in revision 1.9 to simply disable the interpretation of the status and report the entire read as a failure.  this solved several problems involving "good"/"bad" boundary cases, where good memory was not being read because the cache initiated the read on in a bad section overlapping the boundary, and edc never got the proper memory.

the patch in this attachment combines what was in the pre-1.9 code regarding the interpretation of all non BYTE_UNKNOWN statuses to allow a read to be considered a "partial success" with the 1.9 code turning a read of the entire buffer as BYTE_UNKNOWN to mean that the read should be considered a complete failure.

with the commit by eugene tarasov to Bug 327507 (thanks, eugene!), this patch has been tested together with an agent that returns "partial success" results on such boundaries, and committed to the local working repository at nokia for further stress testing.
Comment 1 Jonah Graham CLA 2019-12-30 18:39:42 EST
(this is part of a batch change)

The Eclipse CDT EDC (https://wiki.eclipse.org/CDT/cdt-debug-edc) is now obsolete and has not had any active development since 2011. Therefore the still open bugs are being marked as wontfix.

The git repo for the project still exists for posterity at https://git.eclipse.org/c/cdt/org.eclipse.cdt.edc.git/