7. README_PACKAGERS
Greetings, packaging person!
This information is aimed at people
building binary distributions of Valgrind.
Thanks for taking the time and effort to make a binary distribution of
Valgrind.
The following notes may save you some trouble.
-- Do not ship your Linux distro with a completely stripped
/lib/ld.so.
At least leave the debugging symbol names on -- line
number info isn’t necessary.
If you don’t want to leave symbols on
ld.so, alternatively you can have your distro install ld.so’s
debuginfo package by default, or make ld.so.debuginfo be a
requirement of your Valgrind RPM/DEB/whatever.
Reason for this is that Valgrind’s Memcheck tool needs to intercept
calls to, and provide replacements for, some symbols in ld.so at
startup (most importantly strlen).
If it cannot do that, Memcheck
shows a large number of false positives due to the highly optimised
strlen (etc) routines in ld.so.
This has caused some trouble in
the past.
As of version 3.3.0, on some targets (ppc32-linux,
ppc64-linux), Memcheck will simply stop at startup (and print an
error message) if such symbols are not present, because it is
infeasible to continue.
It’s not like this is going to cost you much space.
We only need
the symbols for ld.so (a few K at most).
Not the debug info and
not any debuginfo or extra symbols for any other libraries.
-- (Unfortunate but true) When you configure to build with the
--prefix=/foo/bar/xyzzy option, the prefix /foo/bar/xyzzy gets
baked into valgrind.
The consequence is that you _must_ install
valgrind at the location specified in the prefix.
If you don’t,
it may appear to work, but will break doing some obscure things,
particularly doing fork() and exec().
So you can’t build a relocatable RPM / whatever from Valgrind.
-- Don’t strip the debug info off lib/valgrind/$platform/vgpreload*.so
in the installation tree.
Either Valgrind won’t work at all, or it
will still work if you do, but will generate less helpful error
messages.
Here’s an example:
Mismatched free() / delete / delete []
at 0x40043249: free (vg_clientfuncs.c:171)
by 0x4102BB4E: QGArray::~QGArray(void) (tools/qgarray.cpp:149)
by 0x4C261C41: PptDoc::~PptDoc(void) (include/qmemarray.h:60)
by 0x4C261F0E: PptXml::~PptXml(void) (pptxml.cc:44)
86
Содержание BBV
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...