| Summary: | Warning: negative range in .debug_loc section | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | alexanderm.08 |
| Component: | sgcheck | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | minor | CC: | alexanderm.08, borntraeger, mark |
| Priority: | NOR | ||
| Version First Reported In: | 3.9.0.SVN | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Verbose log of valgrind | ||
|
Description
alexanderm.08
2012-10-07 14:15:34 UTC
Created attachment 74387 [details]
Verbose log of valgrind
-v output of valgrind for the given example.
I had the same some time ago on s390. It was a gcc bug back then: e.g. http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01219.html Your gcc seems newer. Anyway valgrind should probably just continue instead of ignoring the other debug info. This hack would disable the warning and continue to use the exisiting debug information. Index: valgrind-3.6/coregrind/m_debuginfo/readdwarf3.c =================================================================== --- valgrind-3.6.orig/coregrind/m_debuginfo/readdwarf3.c +++ valgrind-3.6/coregrind/m_debuginfo/readdwarf3.c @@ -590,12 +590,13 @@ static GExpr* make_general_GX ( CUConst* /* else enumerate [w1+base, w2+base) */ /* w2 is 1 past end of range, as per D3 defn for "DW_AT_high_pc" (sec 2.17.2) */ - if (w1 > w2) { +// this happens with some gcc versions. +/* if (w1 > w2) { TRACE_D3("negative range is for .debug_loc expr at " "file offset %lu\n", debug_loc_offset); cc->barf( "negative range in .debug_loc section" ); - } + }*/ /* ignore zero length ranges */ acquire = w1 < w2; Well, I've found the gcc bug tracked on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939 Seems, the analysis "The problem could not be reproduced with head" (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939#c2) was wrong - given head was older than my 4.6.2. Maybe I should re-open that bug or file a follow-up. It is very likely a different bug, so please double check the debugloc section with readelf and open a new bug against gcc if appropriate. I'm confused. Do we need to do anything about this for V 3.9, or can this bug be closed now? If you can provide the information requested in comment #5, please add it. The exp-sgcheck tool isn't part of valgrind anymore and the warning was correct, it was a gcc bug. |