https://bugs.kde.org/show_bug.cgi?id=469782

            Bug ID: 469782
           Summary: Valgrind does not support zstd-compressed debug
                    sections
    Classification: Developer tools
           Product: valgrind
           Version: unspecified
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: s...@gentoo.org
  Target Milestone: ---

SUMMARY

Valgrind cannot read debug symbols compressed using zstd (e.g. objcopy
--compress-debug-sections=zstd or gcc -gz=zstd ...).

Note that Valgrind *does* support zlib-compressed debug symbols.

STEPS TO REPRODUCE
1.  Build an application using `gcc -gz=zstd`, e.g.:
     echo 'int main(){}' | gcc -x c - -ggdb3 -gz=zstd -o /tmp/foo
2. valgrind /tmp/foo

OBSERVED RESULT
```
$ valgrind /tmp/foo
==3964496== Memcheck, a memory error detector
==3964496== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==3964496== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==3964496== Command: /tmp/foo
==3964496==
--3964496-- WARNING: Serious error when reading debug info
--3964496-- When reading debug info from /tmp/foo:
--3964496--    Compression type is unsupported
--3964496-- WARNING: Serious error when reading debug info
--3964496-- When reading debug info from
/usr/libexec/valgrind/memcheck-amd64-linux:
--3964496--    Compression type is unsupported
==3964496==
==3964496== HEAP SUMMARY:
==3964496==     in use at exit: 0 bytes in 0 blocks
==3964496==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==3964496==
==3964496== All heap blocks were freed -- no leaks are possible
==3964496==
==3964496== For lists of detected and suppressed errors, rerun with: -s
==3964496== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
```

EXPECTED RESULT

Successful use of Valgrind, i.e. Valgrind can parse zstd-compressed debug
sections.

ADDITIONAL INFORMATION

See also:
- https://maskray.me/blog/2022-01-23-compressed-debug-sections
- https://maskray.me/blog/2022-09-09-zstd-compressed-debug-sections
- bug 303877 where zlib-compressed debug sections support was added to Valgrind

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to