23 Commits

Author SHA1 Message Date
Paul Floyd
7844752299 Bug 452802 Handle lld 9+ split RW PT_LOAD segments correctly
Many changes mostly related to modifying VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd )
so that instead of triggering debuginfo reading after seeing one RX PT_LOAD and 1 RW PT_LOAD it
can handle either 1 or 2 RW PT_LOADs.
2022-06-09 22:03:04 +02:00
Julian Seward
a2becd59ae Remove redundant assertions and conditionals in move_CEnt_to_top.
move_CEnt_to_top is on the hot path when reading large amounts of debug info,
especially Dwarf inlined-function info.  It shows up in 'perf' profiles.  This
commit removes assertions which are asserted elsewhere, and tries to avoid a
couple of conditional branches.
2021-07-13 09:12:43 +02:00
Julian Seward
3542be5bdc Bug 385386 - Assertion failed "szB >= CACHE_ENTRY_SIZE" on m_debuginfo/image.c:517.
Patch from Reimar Doeffinger (kde@reimardoeffinger.de).
2020-01-22 10:32:31 +01:00
Mark Wielaard
461cc5c003 Cleanup GPL header address notices by using http://www.gnu.org/licenses/
Sync VEX/LICENSE.GPL with top-level COPYING file. We used 3 different
addresses for writing to the FSF to receive a copy of the GPL. Replace
all different variants with an URL <http://www.gnu.org/licenses/>.

The following files might still have some slightly different (L)GPL
copyright notice because they were derived from other programs:

- files under coregrind/m_demangle which come from libiberty:
  cplus-dem.c, d-demangle.c, demangle.h, rust-demangle.c,
  safe-ctype.c and safe-ctype.h
- coregrind/m_demangle/dyn-string.[hc] derived from GCC.
- coregrind/m_demangle/ansidecl.h derived from glibc.
- VEX files for FMA detived from glibc:
  host_generic_maddf.h and host_generic_maddf.c
- files under coregrin/m_debuginfo derived from LZO:
  lzoconf.h, lzodefs.h, minilzo-inl.c and minilzo.h
- files under coregrind/m_gdbserver detived from GDB:
  gdb/signals.h, inferiors.c, regcache.c, regcache.h,
  regdef.h, remote-utils.c, server.c, server.h, signals.c,
  target.c, target.h and utils.c

Plus the following test files:

- none/tests/ppc32/testVMX.c derived from testVMX.
- ppc tests derived from QEMU: jm-insns.c, ppc64_helpers.h
  and test_isa_3_0.c
- tests derived from bzip2 (with embedded GPL text in code):
  hackedbz2.c, origin5-bz2.c, varinfo6.c
- tests detived from glibc: str_tester.c, pth_atfork1.c
- test detived from GCC libgomp: tc17_sembar.c
- performance tests derived from bzip2 or tinycc (with embedded GPL
  text in code): bz2.c, test_input_for_tinycc.c and tinycc.c
2019-05-26 20:07:51 +02:00
Ivo Raisr
38edd50c0e Update copyright end year to 2017 in preparation for 3.13 release.
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16333
2017-05-04 15:09:39 +00:00
Julian Seward
9e280aa166 Bug 377717 - Fix massive space leak when reading compressed debuginfo sections.
This makes reading of compressed debuginfo usable for very large object files.
It also adds a bunch extra documentation about a tricky invariant in the
compressed debuginfo handling (a recursive cache refill path!) and adds a
whole bunch of assertions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16279
2017-03-20 21:34:02 +00:00
Ivo Raisr
da7df0f276 Valgrind is able to read compressed debuginfo sections in two formats:
- zlib ELF gABI format with SHF_COMPRESSED flag (gcc option -gz=zlib)
  - zlib GNU format with .zdebug sections (gcc option -gz=zlib-gnu)

Patch by: Aleksandar Rikalo <aleksandar.rikalo@imgtec.com>
Fixes BZ#303877



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15868
2016-04-23 20:28:27 +00:00
Julian Seward
adc2dafee9 Update copyright dates, to include 2015. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577
2015-08-21 11:32:26 +00:00
Florian Krohm
01ea732633 Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15500
2015-08-05 22:27:24 +00:00
Philippe Waroquiers
8f30180df2 Inline ensure_valid. This improves reading the debug info of big executables
by 1 to 2%



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15327
2015-06-07 10:38:39 +00:00
Julian Seward
6e9e1112dc Update comment about range checks with observations from Florian.
No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14982
2015-03-06 09:19:38 +00:00
Julian Seward
136a2cda56 Minor changes in an attempt to improve performance and reduce
the amount of file-reading resulting from DiImage-cache misses.

CACHE_N_ENTRIES:
Increase the DiImage cache size from 256KB to 8MB to deal with
drastically worse locality when reading inline info.  The 256KB
setting dates from befre inline-info-reading days.

is_in_CEnt: remove a conditional branch from the hot path (of |get|,
effectively)

set_CEnt: marginally improve debug printing



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14977
2015-03-05 00:52:07 +00:00
Florian Krohm
aa6abf5a1d 2 pints later: more coregrind constification.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14659
2014-10-23 17:47:15 +00:00
Florian Krohm
a3a57c92df Constify coregrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14656
2014-10-22 22:25:30 +00:00
Florian Krohm
b1f50bd18d Fix a few casts that dropped type qualifiers. As pointed out by
-Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14554
2014-09-18 18:35:47 +00:00
Florian Krohm
6cf18881c5 The 4th parameter of lzo1x_decompress_safe has lzo_uint * type
which, despite the name, is a pointer to an unsigned long.
So we should be passing arguments of matching type.
Spotted by the Coverity checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14431
2014-09-02 12:05:15 +00:00
Florian Krohm
8a8cc67ca0 Remove some unneeded checks. These were spotted by the Coverity checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14430
2014-09-02 11:58:10 +00:00
Philippe Waroquiers
4dac969352 Mark inline get function in image.c
(called very often, and has a fast/slow case)
This slightly improve the performance of reading the image.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14135
2014-07-06 18:35:18 +00:00
Florian Krohm
5c4ba95a27 Fix inclusion of header files in coregrind. No pub_tool_*.h should be
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13548
2013-09-15 10:42:26 +00:00
Julian Seward
a2e5d25994 Exit a bit more gracefully if a request to get part of an image
exceeds the allowable range.  With this change, it should be
essentially impossible to crash V by feeding it invalid ELF or Dwarf.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13432
2013-06-27 20:31:36 +00:00
Julian Seward
e3116970fd Minimal changes needed to make this suitable for trunk:
* add a new flag --allow-mismatched-debuginfo to override the
  CRC32/build-id checks, if needed

* tidy up logic for finding files on the --extra-debuginfo-path
  and at the --debuginfo-server

* don't assert if connection to the debuginfo server is lost;
  instead print a reasonable message and quit.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13431
2013-06-27 17:39:15 +00:00
Julian Seward
5ab0775dc8 Improve performance of CRC32 computations for files in the local filesystem.
git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13425
2013-06-10 08:34:26 +00:00
Julian Seward
68c9403938 Initial code for remote debuginfo server. Handles all ELF/Dwarf{2,3,4}
on Linux.  No Dwarf1, no Stabs, and MacOSX probably won't build.


git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13423
2013-06-07 16:15:48 +00:00