unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: 54728@debbugs.gnu.org
Subject: bug#54728: Valgrind not working out of the box due to stripped ld.so
Date: Tue, 5 Apr 2022 17:01:32 +0200	[thread overview]
Message-ID: <20220405170132.49b23163@primarylaptop.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

Hi,

The fact that Valgrind doesn't work out of the box seems to already be
known[1] but I didn't find any bugreports on it.

The workaround[1] mentioned is extremely useful but it's far from ideal.

For instance if you have a software that uses Valgrind in its tests
(for instance in 'make check') you end up having to add something like
that in the native-inputs to refer to the right glibc debug symbols
directory:
> ("libc:debug", (@@ (gnu packages commencement) glibc-final) "debug")

In my case I'm using guix and a guix.scm for testing the build of a
library I maintain and I also wanted to automatically check for memory
safety.

I was helped a lot on #guix to solve the issue I had, and during that
mjw suggested to fix the root issue by keeping "the .symtab in ld.so"
without the full debug info (to save space) and if I understood right
mjw is a valgrind contributor.

According to mjw that could be done with strip -g or strip -d or -strip
-S.

Reference:
----------
[1]https://lists.gnu.org/archive/html/help-guix/2022-03/msg00036.html

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2022-04-05 15:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 15:01 Denis 'GNUtoo' Carikli [this message]
2022-04-07 16:40 ` bug#54728: Valgrind not working out of the box due to stripped ld.so Ludovic Courtès
2022-04-14 23:26   ` Denis 'GNUtoo' Carikli
2022-04-14 23:30     ` bug#54728: [PATCH 1/2] gnu: valgrind: impots: sort imports alphabetically Denis 'GNUtoo' Carikli
2022-04-14 23:30       ` bug#54728: [PATCH 2/2] gnu: valgrind: fix ld.so symbols not found Denis 'GNUtoo' Carikli
2022-04-15 16:21         ` Ludovic Courtès
2022-04-25 16:39           ` Denis 'GNUtoo' Carikli
2022-04-25 17:41             ` Maxime Devos
2022-04-26  1:39               ` Denis 'GNUtoo' Carikli
2022-04-26  1:39                 ` bug#54728: [PATCH v2 1/2] gnu: valgrind: impots: sort imports alphabetically Denis 'GNUtoo' Carikli
2022-04-26  1:39                 ` bug#54728: [PATCH v2 2/2] gnu: valgrind: fix ld.so symbols not found Denis 'GNUtoo' Carikli
2022-04-26 22:37                   ` Denis 'GNUtoo' Carikli
2022-05-06 20:16                     ` Denis 'GNUtoo' Carikli
2022-05-06 20:20                       ` Maxime Devos
2022-05-09  9:24                   ` bug#54728: Valgrind not working out of the box due to stripped ld.so Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220405170132.49b23163@primarylaptop.localdomain \
    --to=gnutoo@cyberdimension.org \
    --cc=54728@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).