Another potential bug reported by AI scanning.
On the following two lines
|
bool operator<(const write_t &w) { return (addr < w.addr) && (size < w.size) && (buffer < w.buffer); } |
and
|
bool operator<(const read_t &w) { return (addr < w.addr) && (size < w.size) && (buffer < w.buffer); } |
, the operator <'s returns true only if all three comparison holds. So if there is ever a case where a.addr > b.addr but b.size > a.size => a < b and b< a both won't hold and will be treated as equivalent if ever put into a STL container.
Another potential bug reported by AI scanning.
On the following two lines
dyninst/proccontrol/h/ProcessSet.h
Line 356 in 9fc23a0
and
dyninst/proccontrol/h/ProcessSet.h
Line 363 in 9fc23a0
, the operator <'s returns true only if all three comparison holds. So if there is ever a case where a.addr > b.addr but b.size > a.size => a < b and b< a both won't hold and will be treated as equivalent if ever put into a STL container.