From: John L. <le...@mo...> - 2009-06-19 11:34:42
|
On Thu, Jun 18, 2009 at 04:05:28PM -0500, Maynard Johnson wrote: > A user just reported the following error to me: > opreport error: profile_t::samples_range(): start > end something wrong > with kernel or module layout ? > please report problem to opr...@li... > > I discovered a bug in op_bfd:symbol_size() that was causing this. I found that the symbol was apparently in the last section, so the code fell through to the "else" clause, so end was being set to "file_size". In the case at hand, the sym filepos value (i.e., "start") was 0x19ee8 and file_size was 0x14bca; thus, start > end. This particular piece of code exists for the corner case of last symbol in the last section. Using 'file_size' as the default was, I presume, just a SWAG anyway. The attached patch just ensures that SWAG will always provide an answer that is logically correct. Why is a symbol claiming its position in the file is beyond the size of the file? regards john |