| Summary: | ElfExecutableSymbolicsReader#getSegmentForExecutablesection has an incorrect comparison | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Daniel Thomas <daniel.thomas> | ||||||||
| Component: | cdt-debug-edc | Assignee: | Ken Ryall <ken.ryall> | ||||||||
| Status: | RESOLVED WONTFIX | QA Contact: | Ken Ryall <ken.ryall> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | cdtdoug, kirk.beitz | ||||||||
| Version: | 8.0 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Daniel Thomas
Created attachment 202497 [details]
Patch to change to using >= rather than >
Created attachment 202645 [details] alternate patch to test for low.equals(high) (In reply to comment #0) > Build Identifier: > > This method (which I wrote) checks that the low address is <= but that the high > address is > rather than >= so in the case where the segment contains only one > section (and hence they have equal start and end addresses) then no segment is > returned. > > Reproducible: Always would the "alternate patch to test for low.equals(high)" more accurately fix the situation you are talking about without capturing those cases where you are interested in the section? i've nominally tested the alternate patch with our JUnit suite and committed it to our local repository pending final review and eclipse edc git merge by committer ken ryall. Sorry I didn't see your alternative patch get added. I am fairly sure the logic in it is wrong as it will return as being the segment containing the section any zero length segment with a low address less than or equal to the low address of the section while still not returning a containing segment which covers exactly the same region as the section which was the point of the patch. Sorry I should have made this clearer and written a test case to check this. I will try and do that now. Created attachment 202885 [details]
Patch to test this behavoiur
I thought it would be rather tedious to right a test for the one character fix - and it was but hopefully it will also provide some testing on more general functionality and provide a base for better testing of ElfExecutableSymbolicsReader.
(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/ |