|
From: Jeremy F. <je...@go...> - 2004-03-04 22:50:33
|
On Thu, 2004-03-04 at 12:13, George Staikos wrote:
> 47306 type=224 othr=0 desc=0 value=0x16C strx=0
> }
> 47307 type=224 othr=0 desc=0 value=0x8C strx=0
>
> So the failure is at the outer most scope. The assert fails because
> range->size = -0xe0. I'm not sure if it's a coincidence that
> 0x16c=0x8c+0xe0. Any ideas what could be going wrong here? I have tried
> several C++ programs and they all trigger this, while I haven't found a
> single C program that fails so far. GCC version is 2.95.4.
No, that's exactly right. The debug contains a scope which ends before
it begins. I may need to look into it in more detail (there could be a
meaningful interpretation of this), but the simple fix, which is in CVS
HEAD, is this:
coregrind/vg_symtab2.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN coregrind/vg_symtab2.c~fix-negscope coregrind/vg_symtab2.c
--- valgrind/coregrind/vg_symtab2.c~fix-negscope 2004-02-05 14:00:54.115608640 -0800
+++ valgrind-jeremy/coregrind/vg_symtab2.c 2004-02-05 14:01:15.046426672 -0800
@@ -301,8 +301,8 @@ void VG_(addScopeInfo) ( SegInfo* si,
Int size = next - this;
ScopeRange range;
- /* Ignore zero-sized scopes */
- if (this == next) {
+ /* Ignore zero-sized or negative scopes */
+ if (size <= 0) {
if (debug)
VG_(printf)("ignoring zero-sized range, scope %p at %p\n", scope, this);
return;
_
|