|
From: Thomas W. <WOL...@ms...> - 2022-02-14 00:51:14
|
Hi, This is a just a quick question. As I haven't found a sufficient answer in the archives. Does Valgrind-3.19.0.GIT support Clang14's dwarf5 yet? Compiling my application with '-gfull -gdwarf-4 -gdwarf64' allows valgrind to function as expected. When using `-gfull -gdwarf-5 -gdwarf64` I get this failure report. ==139537== Memcheck, a memory error detector ==139537== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==139537== Using Valgrind-3.19.0.GIT and LibVEX; rerun with -h for copyright info ==139537== Command: ./TheAppName ==139537== Parent PID: 139504 ==139537== ### unhandled dwarf2 abbrev form code 0x25 ### unhandled dwarf2 abbrev form code 0x25 ### unhandled dwarf2 abbrev form code 0x25 ### unhandled dwarf2 abbrev form code 0x23 ==139537== Valgrind: debuginfo reader: ensure_valid failed: ==139537== Valgrind: during call to ML_(img_get) ==139537== Valgrind: request for range [11350107, +4) exceeds ==139537== Valgrind: valid image size of 1584416 for image: ==139537== Valgrind: "/path/to/TheAppName" ==139537== ==139537== Valgrind: debuginfo reader: Possibly corrupted debuginfo file. ==139537== Valgrind: I can't recover. Giving up. Sorry. ==139537== Cheers -Thomas |
|
From: Mark W. <ma...@kl...> - 2022-02-14 08:02:44
|
Hi Thomas, On Sun, Feb 13, 2022 at 08:18:48PM +0000, Thomas Wollenzin wrote: > This is a just a quick question. As I haven't found a sufficient answer in the archives. > Does Valgrind-3.19.0.GIT support Clang14's dwarf5 yet? > > Compiling my application with '-gfull -gdwarf-4 -gdwarf64' allows valgrind to function as expected. > When using `-gfull -gdwarf-5 -gdwarf64` I get this failure report. > > ==139537== Memcheck, a memory error detector > ==139537== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. > ==139537== Using Valgrind-3.19.0.GIT and LibVEX; rerun with -h for copyright info > ==139537== Command: ./TheAppName > ==139537== Parent PID: 139504 > ==139537== > ### unhandled dwarf2 abbrev form code 0x25 > ### unhandled dwarf2 abbrev form code 0x25 > ### unhandled dwarf2 abbrev form code 0x25 > ### unhandled dwarf2 abbrev form code 0x23 > ==139537== Valgrind: debuginfo reader: ensure_valid failed: > ==139537== Valgrind: during call to ML_(img_get) > ==139537== Valgrind: request for range [11350107, +4) exceeds > ==139537== Valgrind: valid image size of 1584416 for image: > ==139537== Valgrind: "/path/to/TheAppName" > ==139537== > ==139537== Valgrind: debuginfo reader: Possibly corrupted debuginfo file. > ==139537== Valgrind: I can't recover. Giving up. Sorry. > ==139537== As you can see above, valgrind doesn't. clang uses rnglistx and strx form codes, which are normally (by gcc) only used with split-dwarf (which valgrind doesn't support yet). Best is to simply use -gdwarf-4 with clang. Cheers, Mark |
|
From: ISHIKAWA,chiaki <ish...@yk...> - 2022-02-16 04:05:19
|
This is tangent to the original question, but this part: > with split-dwarf (which rnglistx and strx form codes doesn't support yet) valgrind does support bulk of data generated by --split-dwarf (gcc), doesn't it? The above refers to "doesn't support" rnglistx and strx form codes? I am asking this because I have checked mozilla thunderbird code which is compiled using --split-dwarf of GCC and valgrind reports reasonably sane diagnosis so far. Well, that is what I thought. Maybe I was mistaken. Will you kindly clarify the above? TIA Chiaki Ishikawa On 2022/02/14 17:02, Mark Wielaard wrote: > Hi Thomas, > > On Sun, Feb 13, 2022 at 08:18:48PM +0000, Thomas Wollenzin wrote: >> This is a just a quick question. As I haven't found a sufficient answer in the archives. >> Does Valgrind-3.19.0.GIT support Clang14's dwarf5 yet? >> >> Compiling my application with '-gfull -gdwarf-4 -gdwarf64' allows valgrind to function as expected. >> When using `-gfull -gdwarf-5 -gdwarf64` I get this failure report. >> >> ==139537== Memcheck, a memory error detector >> ==139537== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. >> ==139537== Using Valgrind-3.19.0.GIT and LibVEX; rerun with -h for copyright info >> ==139537== Command: ./TheAppName >> ==139537== Parent PID: 139504 >> ==139537== >> ### unhandled dwarf2 abbrev form code 0x25 >> ### unhandled dwarf2 abbrev form code 0x25 >> ### unhandled dwarf2 abbrev form code 0x25 >> ### unhandled dwarf2 abbrev form code 0x23 >> ==139537== Valgrind: debuginfo reader: ensure_valid failed: >> ==139537== Valgrind: during call to ML_(img_get) >> ==139537== Valgrind: request for range [11350107, +4) exceeds >> ==139537== Valgrind: valid image size of 1584416 for image: >> ==139537== Valgrind: "/path/to/TheAppName" >> ==139537== >> ==139537== Valgrind: debuginfo reader: Possibly corrupted debuginfo file. >> ==139537== Valgrind: I can't recover. Giving up. Sorry. >> ==139537== > As you can see above, valgrind doesn't. clang uses rnglistx and strx > form codes, which are normally (by gcc) only used with split-dwarf > (which valgrind doesn't support yet). Best is to simply use -gdwarf-4 > with clang. > > Cheers, > > Mark > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Mark W. <ma...@kl...> - 2022-02-16 11:24:44
|
On Wed, Feb 16, 2022 at 12:46:32PM +0900, ISHIKAWA,chiaki wrote: > This is tangent to the original question, but this part: > > > with split-dwarf (which rnglistx and strx > form codes doesn't support yet) > > valgrind does support bulk of data generated by --split-dwarf (gcc), > doesn't it? No, it doesn't. valgrind won't read .dwo files/sections at all which split-dwarf uses. > The above refers to "doesn't support" rnglistx and strx form codes? And addrx forms. These are normally only used (by gcc) for split-dwarf and involve an extra indirection through an index to reach the value of the attribute. These forms are technically valid in non-split-dwarf (with DWARF5) but not supported by valgrind. > I am asking this because I have checked mozilla thunderbird code > which is compiled using --split-dwarf of GCC and valgrind reports > reasonably sane diagnosis so far. valgrind can report valid diagnostics with DWARF debuginfo, but it might be less accurate, for example it won't report on inlined functions. I happened to give a talk on that recently: https://fosdem.org/2022/schedule/event/valgrind_debuginfo/ (That talk doesn't cover split-dwarf though) Cheers, Mark |
|
From: ISHIKAWA,chiaki <ish...@yk...> - 2022-02-17 18:22:45
|
Thank you for your clarification. It certainly seems the inlined function is not handled well, come to think of it. I will look at the video you kindly referred to. Thank you again. Chiaki On 2022/02/16 20:24, Mark Wielaard wrote: > On Wed, Feb 16, 2022 at 12:46:32PM +0900, ISHIKAWA,chiaki wrote: >> This is tangent to the original question, but this part: >> >>> with split-dwarf (which rnglistx and strx >> form codes doesn't support yet) >> >> valgrind does support bulk of data generated by --split-dwarf (gcc), >> doesn't it? > No, it doesn't. valgrind won't read .dwo files/sections at all which > split-dwarf uses. > >> The above refers to "doesn't support" rnglistx and strx form codes? > And addrx forms. These are normally only used (by gcc) for split-dwarf > and involve an extra indirection through an index to reach the value > of the attribute. These forms are technically valid in non-split-dwarf > (with DWARF5) but not supported by valgrind. > >> I am asking this because I have checked mozilla thunderbird code >> which is compiled using --split-dwarf of GCC and valgrind reports >> reasonably sane diagnosis so far. > valgrind can report valid diagnostics with DWARF debuginfo, but it > might be less accurate, for example it won't report on inlined > functions. > > I happened to give a talk on that recently: > https://fosdem.org/2022/schedule/event/valgrind_debuginfo/ > (That talk doesn't cover split-dwarf though) > > Cheers, > > Mark > |