History log of /external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ed39800a83baf5bffbe391f3974eb2af0f415f80 21-Jun-2017 Elliott Hughes <enh@google.com> Upgrade to valgrind 3.13.0 (15 June 2017).

Release 3.13.0 (15 June 2017)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.13.0 is a feature release with many improvements and the usual collection of
bug fixes.

This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux,
PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux,
MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android,
X86/Solaris, AMD64/Solaris and AMD64/MacOSX 10.12.

* ==================== CORE CHANGES ===================

* The translation cache size has been increased to keep up with the demands of
large applications. The maximum number of sectors has increased from 24 to
48. The default number of sectors has increased from 16 to 32 on all
targets except Android, where the increase is from 6 to 12.

* The amount of memory that Valgrind can use has been increased from 64GB to
128GB. In particular this means your application can allocate up to about
60GB when running on Memcheck.

* Valgrind's default load address has been changed from 0x3800'0000 to
0x5800'0000, so as to make it possible to load larger executables. This
should make it possible to load executables of size at least 1200MB.

* A massive spaceleak caused by reading compressed debuginfo files has been
fixed. Valgrind should now be entirely usable with gcc-7.0 "-gz" created
debuginfo.

* The C++ demangler has been updated.

* Support for demangling Rust symbols has been added.

* A new representation of stack traces, the "XTree", has been added. An XTree
is a tree of stacktraces with data associated with the stacktraces. This is
used by various tools (Memcheck, Helgrind, Massif) to report on the heap
consumption of your program. Reporting is controlled by the new options
--xtree-memory=none|allocs|full and --xtree-memory-file=<file>.

A report can also be produced on demand using the gdbserver monitor command
'xtmemory [<filename>]>'. The XTree can be output in 2 formats: 'callgrind
format' and 'massif format. The existing visualisers for these formats (e.g.
callgrind_annotate, KCachegrind, ms_print) can be used to visualise and
analyse these reports.

Memcheck can also produce XTree leak reports using the Callgrind file
format. For more details, see the user manual.

* ================== PLATFORM CHANGES =================

* ppc64: support for ISA 3.0B and various fixes for existing 3.0 support

* amd64: fixes for JIT failure problems on long AVX2 code blocks

* amd64 and x86: support for CET prefixes has been added

* arm32: a few missing ARMv8 instructions have been implemented

* arm64, mips64, mips32: an alternative implementation of Load-Linked and
Store-Conditional instructions has been added. This is to deal with
processor implementations that implement the LL/SC specifications strictly
and as a result cause Valgrind to hang in certain situations. The
alternative implementation is automatically enabled at startup, as required.
You can use the option --sim-hints=fallback-llsc to force-enable it if you
want.

* Support for OSX 10.12 has been improved.

* On Linux, clone handling has been improved to honour CLONE_VFORK that
involves a child stack. Note however that CLONE_VFORK | CLONE_VM is handled
like CLONE_VFORK (by removing CLONE_VM), so applications that depend on
CLONE_VM exact semantics will (still) not work.

* The TileGX/Linux port has been removed because it appears to be both unused
and unsupported.

* ==================== TOOL CHANGES ====================

* Memcheck:

- Memcheck should give fewer false positives when running optimised
Clang/LLVM generated code.

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- New command line options --xtree-leak=no|yes and --xtree-leak-file=<file>
to produce the end of execution leak report in a xtree callgrind format
file.

- New option 'xtleak' in the memcheck leak_check monitor command, to produce
the leak report in an xtree file.

* Massif:

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- For some workloads (typically, for big applications), Massif memory
consumption and CPU consumption has decreased significantly.

* Helgrind:

- Support for --xtree-memory and 'xtmemory [<filename>]>'.

- addition of client request VALGRIND_HG_GNAT_DEPENDENT_MASTER_JOIN, useful
for Ada gnat compiled applications.

* ==================== OTHER CHANGES ====================

* For Valgrind developers: in an outer/inner setup, the outer Valgrind will
append the inner guest stacktrace to the inner host stacktrace. This helps
to investigate the errors reported by the outer, when they are caused by the
inner guest program (such as an inner regtest). See README_DEVELOPERS for
more info.

* To allow fast detection of callgrind files by desktop environments and file
managers, the format was extended to have an optional first line that
uniquely identifies the format ("# callgrind format"). Callgrind creates
this line now, as does the new xtree functionality.

* File name template arguments (such as --log-file, --xtree-memory-file, ...)
have a new %n format letter that is replaced by a sequence number.

* "--version -v" now shows the SVN revision numbers from which Valgrind was
built.

* ==================== FIXED BUGS ====================

The following bugs have been fixed or resolved. Note that "n-i-bz"
stands for "not in bugzilla" -- that is, a bug that was reported to us
but never got a bugzilla entry. We encourage you to file bugs in
bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.

To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.

162848 --log-file output isn't split when a program forks
340777 Illegal instruction on mips (ar71xx)
341481 MIPS64: Iop_CmpNE32 triggers false warning on MIPS64 platforms
342040 Valgrind mishandles clone with CLONE_VFORK | CLONE_VM that clones
to a different stack.
344139 x86 stack-seg overrides, needed by the Wine people
344524 store conditional of guest applications always fail - observed on
Octeon3(MIPS)
348616 Wine/valgrind: noted but unhandled ioctl 0x5390 [..] (DVD_READ_STRUCT)
352395 Please provide SVN revision info in --version -v
352767 Wine/valgrind: noted but unhandled ioctl 0x5307 [..] (CDROMSTOP)
356374 Assertion 'DRD_(g_threadinfo)[tid].pt_threadid !=
INVALID_POSIX_THREADID' failed
358213 helgrind/drd bar_bad testcase hangs or crashes with new glibc pthread
barrier implementation
358697 valgrind.h: Some code remains even when defining NVALGRIND
359202 Add musl libc configure/compile
360415 amd64 instructions ADCX and ADOX are not implemented in VEX
== 372828 (vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10)
360429 unhandled ioctl 0x530d with no size/direction hints (CDROMREADMODE1)
362223 assertion failed when .valgrindrc is a directory instead of a file
367543 bt/btc/btr/bts x86/x86_64 instructions are poorly-handled wrt flags
367942 Segfault vgPlain_do_sys_sigaction (m_signals.c:1138)
368507 can't malloc chunks larger than about 34GB
368529 Android arm target link error, missing atexit and pthread_atfork
368863 WARNING: unhandled arm64-linux syscall: 100 (get_robust_list)
368865 WARNING: unhandled arm64-linux syscall: 272 (kcmp)
368868 disInstr(arm64): unhandled instruction 0xD53BE000 = cntfrq_el0 (ARMv8)
368917 WARNING: unhandled arm64-linux syscall: 218 (request_key)
368918 WARNING: unhandled arm64-linux syscall: 127 (sched_rr_get_interval)
368922 WARNING: unhandled arm64-linux syscall: 161 (sethostname)
368924 WARNING: unhandled arm64-linux syscall: 84 (sync_file_range)
368925 WARNING: unhandled arm64-linux syscall: 130 (tkill)
368926 WARNING: unhandled arm64-linux syscall: 97 (unshare)
369459 valgrind on arm64 violates the ARMv8 spec (ldxr/stxr)
370028 Reduce the number of compiler warnings on MIPS platforms
370635 arm64 missing syscall getcpu
371225 Fix order of timer_{gettime,getoverrun,settime} syscalls on arm64
371227 Clean AArch64 syscall table
371412 Rename wrap_sys_shmat to sys_shmat like other wrappers
371471 Valgrind complains about non legit memory leaks on placement new (C++)
371491 handleAddrOverrides() is [incorrect] when ASO prefix is used
371503 disInstr(arm64): unhandled instruction 0xF89F0000
371869 support '%' in symbol Z-encoding
371916 execution tree xtree concept
372120 c++ demangler demangles symbols which are not c++
372185 Support of valgrind on ARMv8 with 32 bit executable
372188 vex amd64->IR: 0x66 0xF 0x3A 0x62 0x4A 0x10 0x10 0x48 (PCMPxSTRx $0x10)
372195 Power PC, xxsel instruction is not always recognized.
372504 Hanging on exit_group
372600 process loops forever when fatal signals are arriving quickly
372794 LibVEX (arm32 front end): 'Assertion szBlg2 <= 3' failed
373046 Stacks registered by core are never deregistered
373069 memcheck/tests/leak_cpp_interior fails with GCC 5.1+
373086 Implement additional Xen hypercalls
373192 Calling posix_spawn in glibc 2.24 completely broken
373488 Support for fanotify API on ARM64 architecture
== 368864 WARNING: unhandled arm64-linux syscall: 262 (fanotify_init)
373555 Rename BBPTR to GSPTR as it denotes guest state pointer only
373938 const IRExpr arguments for matchIRExpr()
374719 some spelling fixes
374963 increase valgrind's load address to prevent mmap failure
375514 valgrind_get_tls_addr() does not work in case of static TLS
375772 +1 error in get_elf_symbol_info() when computing value of 'hi' address
for ML_(find_rx_mapping)()
375806 Test helgrind/tests/tc22_exit_w_lock fails with glibc 2.24
375839 Temporary storage exhausted, with long sequence of vfmadd231ps insns
== 377159 "vex: the `impossible' happened" still present
== 375150 Assertion 'tres.status == VexTransOK' failed
== 378068 valgrind crashes on AVX2 function in FFmpeg
376142 Segfaults on MIPS Cavium Octeon boards
376279 disInstr(arm64): unhandled instruction 0xD50320FF
376455 Solaris: unhandled syscall lgrpsys(180)
376518 Solaris: unhandled fast trap getlgrp(6)
376611 ppc64 and arm64 don't know about prlimit64 syscall
376729 PPC64, remove R2 from the clobber list
== 371668
376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some addresses
to be wrongly marked as addressable
377066 Some Valgrind unit tests fail to compile on Ubuntu 16.10 with
PIE enabled by default
377376 memcheck/tests/linux/getregset fails with glibc2.24
377427 PPC64, lxv instruction failing on odd destination register
377478 PPC64: ISA 3.0 setup fixes
377698 Missing memory check for futex() uaddr arg for FUTEX_WAKE
and FUTEX_WAKE_BITSET, check only 4 args for FUTEX_WAKE_BITSET,
and 2 args for FUTEX_TRYLOCK_PI
377717 Fix massive space leak when reading compressed debuginfo sections
377891 Update Xen 4.6 domctl wrappers
377930 fcntl syscall wrapper is missing flock structure check
378524 libvexmultiarch_test regression on s390x and ppc64
378535 Valgrind reports INTERNAL ERROR in execve syscall wrapper
378673 Update libiberty demangler
378931 Add ISA 3.0B additional isnstructions, add OV32, CA32 setting support
379039 syscall wrapper for prctl(PR_SET_NAME) must not check more than 16 bytes
379094 Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
379371 UNKNOWN task message [id 3444, to mach_task_self(), reply 0x603]
(task_register_dyld_image_infos)
379372 UNKNOWN task message [id 3447, to mach_task_self(), reply 0x603]
(task_register_dyld_shared_cache_image_info)
379390 unhandled syscall: mach:70 (host_create_mach_voucher_trap)
379473 MIPS: add support for rdhwr cycle counter register
379504 remove TileGX/Linux port
379525 Support more x86 nop opcodes
379838 disAMode(x86): not an addr!
379703 PC ISA 3.0 fixes: stxvx, stxv, xscmpexpdp instructions
379890 arm: unhandled instruction: 0xEBAD 0x1B05 (sub.w fp, sp, r5, lsl #4)
379895 clock_gettime does not execute POST syscall wrapper
379925 PPC64, mtffs does not set the FPCC and C bits in the FPSCR correctly
379966 WARNING: unhandled amd64-linux syscall: 313 (finit_module)
380200 xtree generated callgrind files refer to files without directory name
380202 Assertion failure for cache line size (cls == 64) on aarch64.
380397 s390x: __GI_strcspn() replacement needed
n-i-bz Fix pub_tool_basics.h build issue with g++ 4.4.7.

(3.13.0.RC1: 2 June 2017, vex r3386, valgrind r16434)
(3.13.0.RC2: 9 June 2017, vex r3389, valgrind r16443)
(3.13.0: 14 June 2017, vex r3396, valgrind r16446)

Bug: N/A
Test: manual
Change-Id: Id4498a49f462c3689cbcb35c15f96a8c7e3cea17
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
a0664b9ca67b594bd6f570a61d3301167a24750c 19-Apr-2017 Elliott Hughes <enh@google.com> Upgrade to valgrind 3.12.0.

Release 3.12.0 (20 October 2016)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.12.0 is a feature release with many improvements and the usual
collection of bug fixes.

This release supports X86/Linux, AMD64/Linux, ARM32/Linux,
ARM64/Linux, PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux,
MIPS32/Linux, MIPS64/Linux, ARM/Android, ARM64/Android,
MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/MacOSX
10.10 and AMD64/MacOSX 10.10. There is also preliminary support for
X86/MacOSX 10.11/12, AMD64/MacOSX 10.11/12 and TILEGX/Linux.

* ================== PLATFORM CHANGES =================

* POWER: Support for ISA 3.0 has been added

* mips: support for O32 FPXX ABI has been added.
* mips: improved recognition of different processors
* mips: determination of page size now done at run time

* amd64: Partial support for AMD FMA4 instructions.

* arm, arm64: Support for v8 crypto and CRC instructions.

* Improvements and robustification of the Solaris port.

* Preliminary support for MacOS 10.12 (Sierra) has been added.

Whilst 3.12.0 continues to support the 32-bit x86 instruction set, we
would prefer users to migrate to 64-bit x86 (a.k.a amd64 or x86_64)
where possible. Valgrind's support for 32-bit x86 has stagnated in
recent years and has fallen far behind that for 64-bit x86
instructions. By contrast 64-bit x86 is well supported, up to and
including AVX2.

* ==================== TOOL CHANGES ====================

* Memcheck:

- Added meta mempool support for describing a custom allocator which:
- Auto-frees all chunks assuming that destroying a pool destroys all
objects in the pool
- Uses itself to allocate other memory blocks

- New flag --ignore-range-below-sp to ignore memory accesses below
the stack pointer, if you really have to. The related flag
--workaround-gcc296-bugs=yes is now deprecated. Use
--ignore-range-below-sp=1024-1 as a replacement.

* DRD:

- Improved thread startup time significantly on non-Linux platforms.

* DHAT

- Added collection of the metric "tot-blocks-allocd"

* ==================== OTHER CHANGES ====================

* Replacement/wrapping of malloc/new related functions is now done not just
for system libraries by default, but for any globally defined malloc/new
related function (both in shared libraries and statically linked alternative
malloc implementations). The dynamic (runtime) linker is excluded, though.
To only intercept malloc/new related functions in
system libraries use --soname-synonyms=somalloc=nouserintercepts (where
"nouserintercepts" can be any non-existing library name).
This new functionality is not implemented for MacOS X.

* The maximum number of callers in a suppression entry is now equal to
the maximum size for --num-callers (500).
Note that --gen-suppressions=yes|all similarly generates suppressions
containing up to --num-callers frames.

* New and modified GDB server monitor features:

- Valgrind's gdbserver now accepts the command 'catch syscall'.
Note that you must have GDB >= 7.11 to use 'catch syscall' with
gdbserver.

* New option --run-cxx-freeres=<yes|no> can be used to change whether
__gnu_cxx::__freeres() cleanup function is called or not. Default is
'yes'.

* 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)

* Modest JIT-cost improvements: the cost of instrumenting code blocks
for the most common use case (x86_64-linux, Memcheck) has been
reduced by 10%-15%.

* Improved performance for programs that do a lot of discarding of
instruction address ranges of 8KB or less.

* The C++ symbol demangler has been updated.

* More robustness against invalid syscall parameters on Linux.

* ==================== FIXED BUGS ====================

The following bugs have been fixed or resolved. Note that "n-i-bz"
stands for "not in bugzilla" -- that is, a bug that was reported to us
but never got a bugzilla entry. We encourage you to file bugs in
bugzilla (https://bugs.kde.org/enter_bug.cgi?product=valgrind) rather
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.

To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed below.

191069 Exiting due to signal not reported in XML output
199468 Suppressions: stack size limited to 25
while --num-callers allows more frames
212352 vex amd64 unhandled opc_aux = 0x 2, first_opcode == 0xDC (FCOM)
278744 cvtps2pd with redundant RexW
303877 valgrind doesn't support compressed debuginfo sections.
345307 Warning about "still reachable" memory when using libstdc++ from gcc 5
348345 Assertion fails for negative lineno
351282 V 3.10.1 MIPS softfloat build broken with GCC 4.9.3 / binutils 2.25.1
351692 Dumps created by valgrind are not readable by gdb (mips32 specific)
351804 Crash on generating suppressions for "printf" call on OS X 10.10
352197 mips: mmap2() not wrapped correctly for page size > 4096
353083 arm64 doesn't implement various xattr system calls
353084 arm64 doesn't support sigpending system call
353137 www: update info for Supported Platforms
353138 www: update "The Valgrind Developers" page
353370 don't advertise RDRAND in cpuid for Core-i7-4910-like avx2 machine
== 365325
== 357873
353384 amd64->IR: 0x66 0xF 0x3A 0x62 0xD1 0x62 (pcmpXstrX $0x62)
353398 WARNING: unhandled amd64-solaris syscall: 207
353660 XML in auxwhat tag not escaping reserved symbols properly
353680 s390x: Crash with certain glibc versions due to non-implemented TBEGIN
353727 amd64->IR: 0x66 0xF 0x3A 0x62 0xD1 0x72 (pcmpXstrX $0x72)
353802 ELF debug info reader confused with multiple .rodata sections
353891 Assert 'bad_scanned_addr < VG_ROUNDDN(start+len, sizeof(Addr))' failed
353917 unhandled amd64-solaris syscall fchdir(120)
353920 unhandled amd64-solaris syscall: 170
354274 arm: unhandled instruction: 0xEBAD 0x0AC1 (sub.w sl, sp, r1, lsl #3)
354392 unhandled amd64-solaris syscall: 171
354797 Vbit test does not include Iops for Power 8 instruction support
354883 tst->os_state.pthread - magic_delta assertion failure on OSX 10.11
== 361351
== 362920
== 366222
354933 Fix documentation of --kernel-variant=android-no-hw-tls option
355188 valgrind should intercept all malloc related global functions
355454 do not intercept malloc related symbols from the runtime linker
355455 stderr.exp of test cases wrapmalloc and wrapmallocstatic overconstrained
356044 Dwarf line info reader misinterprets is_stmt register
356112 mips: replace addi with addiu
356393 valgrind (vex) crashes because isZeroU happened
== 363497
== 364497
356676 arm64-linux: unhandled syscalls 125, 126 (sched_get_priority_max/min)
356678 arm64-linux: unhandled syscall 232 (mincore)
356817 valgrind.h triggers compiler errors on MSVC when defining NVALGRIND
356823 Unsupported ARM instruction: stlex
357059 x86/amd64: SSE cvtpi2ps with memory source does transition to MMX state
357338 Unhandled instruction for SHA instructions libcrypto Boring SSL
357673 crash if I try to run valgrind with a binary link with libcurl
357833 Setting RLIMIT_DATA to zero breaks with linux 4.5+
357871 pthread_spin_destroy not properly wrapped
357887 Calls to VG_(fclose) do not close the file descriptor
357932 amd64->IR: accept redundant REX prefixes for {minsd,maxsd} m128, xmm.
358030 support direct socket calls on x86 32bit (new in linux 4.3)
358478 drd/tests/std_thread.cpp doesn't build with GCC6
359133 Assertion 'eltSzB <= ddpa->poolSzB' failed
359181 Buffer Overflow during Demangling
359201 futex syscall "skips" argument 5 if op is FUTEX_WAIT_BITSET
359289 s390x: popcnt (B9E1) not implemented
359472 The Power PC vsubuqm instruction doesn't always give the correct result
359503 Add missing syscalls for aarch64 (arm64)
359645 "You need libc6-dbg" help message could be more helpful
359703 s390: wire up separate socketcalls system calls
359724 getsockname might crash - deref_UInt should call safe_to_deref
359733 amd64 implement ld.so strchr/index override like x86
359767 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 1/5
359829 Power PC test suite none/tests/ppc64/test_isa_2_07.c uses
uninitialized data
359838 arm64: Unhandled instruction 0xD5033F5F (clrex)
359871 Incorrect mask handling in ppoll
359952 Unrecognised PCMPESTRM variants (0x70, 0x19)
360008 Contents of Power vr registers contents is not printed correctly when
the --vgdb-shadow-registers=yes option is used
360035 POWER PC instruction bcdadd and bcdsubtract generate result with
non-zero shadow bits
360378 arm64: Unhandled instruction 0x5E280844 (sha1h s4, s2)
360425 arm64 unsupported instruction ldpsw
== 364435
360519 none/tests/arm64/memory.vgtest might fail with newer gcc
360571 Error about the Android Runtime reading below the stack pointer on ARM
360574 Wrong parameter type for an ashmem ioctl() call on Android and ARM64
360749 kludge for multiple .rodata sections on Solaris no longer needed
360752 raise the number of reserved fds in m_main.c from 10 to 12
361207 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 2/5
361226 s390x: risbgn (EC59) not implemented
361253 [s390x] ex_clone.c:42: undefined reference to `pthread_create'
361354 ppc64[le]: wire up separate socketcalls system calls
361615 Inconsistent termination for multithreaded process terminated by signal
361926 Unhandled Solaris syscall: sysfs(84)
362009 V dumps core on unimplemented functionality before threads are created
362329 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 3/5
362894 missing (broken) support for wbit field on mtfsfi instruction (ppc64)
362935 [AsusWRT] Assertion 'sizeof(TTEntryC) <= 88' failed
362953 Request for an update to the Valgrind Developers page
363680 add renameat2() support
363705 arm64 missing syscall name_to_handle_at and open_by_handle_at
363714 ppc64 missing syscalls sync, waitid and name_to/open_by_handle_at
363858 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 4/5
364058 clarify in manual limitations of array overruns detections
364413 pselect sycallwrapper mishandles NULL sigmask
364728 Power PC, missing support for several HW registers in
get_otrack_shadow_offset_wrk()
364948 Valgrind does not support the IBM POWER ISA 3.0 instructions, part 5/5
365273 Invalid write to stack location reported after signal handler runs
365912 ppc64BE segfault during jm-insns test (RELRO)
366079 FPXX Support for MIPS32 Valgrind
366138 Fix configure errors out when using Xcode 8 (clang 8.0.0)
366344 Multiple unhandled instruction for Aarch64
(0x0EE0E020, 0x1AC15800, 0x4E284801, 0x5E040023, 0x5E056060)
367995 Integration of memcheck with custom memory allocator
368120 x86_linux asm _start functions do not keep 16-byte aligned stack pointer
368412 False positive result for altivec capability check
368416 Add tc06_two_races_xml.exp output for ppc64
368419 Perf Events ioctls not implemented
368461 mmapunmap test fails on ppc64
368823 run_a_thread_NORETURN assembly code typo for VGP_arm64_linux target
369000 AMD64 fma4 instructions unsupported.
369169 ppc64 fails jm_int_isa_2_07 test
369175 jm_vec_isa_2_07 test crashes on ppc64
369209 valgrind loops and eats up all memory if cwd doesn't exist.
369356 pre_mem_read_sockaddr syscall wrapper can crash with bad sockaddr
369359 msghdr_foreachfield can crash when handling bad iovec
369360 Bad sigprocmask old or new sets can crash valgrind
369361 vmsplice syscall wrapper crashes on bad iovec
369362 Bad sigaction arguments crash valgrind
369383 x86 sys_modify_ldt wrapper crashes on bad ptr
369402 Bad set/get_thread_area pointer crashes valgrind
369441 bad lvec argument crashes process_vm_readv/writev syscall wrappers
369446 valgrind crashes on unknown fcntl command
369439 S390x: Unhandled insns RISBLG/RISBHG and LDE/LDER
369468 Remove quadratic metapool algorithm using VG_(HT_remove_at_Iter)
370265 ISA 3.0 HW cap stuff needs updating
371128 BCD add and subtract instructions on Power BE in 32-bit mode do not work
n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 and amd64
n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap
n-i-bz false positive leaks due to aspacemgr merging heap & non heap segments
n-i-bz Fix ppoll_alarm exclusion on OS X
n-i-bz Document brk segment limitation, reference manual in limit reached msg.
n-i-bz Fix clobber list in none/tests/amd64/xacq_xrel.c [valgrind r15737]
n-i-bz Bump allowed shift value for "add.w reg, sp, reg, lsl #N" [vex r3206]
n-i-bz amd64: memcheck false positive with shr %edx
n-i-bz arm3: Allow early writeback of SP base register in "strd rD, [sp, #-16]"
n-i-bz ppc: Fix two cases of PPCAvFpOp vs PPCFpOp enum confusion
n-i-bz arm: Fix incorrect register-number constraint check for LDAEX{,B,H,D}
n-i-bz DHAT: added collection of the metric "tot-blocks-allocd"

(3.12.0.RC1: 20 October 2016, vex r3282, valgrind r16094)
(3.12.0.RC2: 20 October 2016, vex r3282, valgrind r16096)
(3.12.0: 21 October 2016, vex r3282, valgrind r16098)

Bug: http://b/37470713
Bug: http://b/29251682
Test: ran runtests-arm(64)?.sh and the bug reporter's specific binary (32- and 64-bit)
Change-Id: I43ccbea946d89fc4ae9f355181ac5061d6ce4453
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
f7e83455272d3d819ccb9225ab69f4677f0ac7cc 19-Oct-2015 rhyskidd <rhyskidd@a5019735-40e9-0310-863c-91ae7b9d1cf9> Silence -Wincompatible-pointer-types-discards-qualifiers warning. n-i-bz.

m_replacemalloc/vg_replace_malloc.c:1286:1: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
ZONE_GET_NAME(VG_Z_LIBC_SONAME, malloc_get_zone_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1283:14: note: expanded from macro 'ZONE_GET_NAME'
return vg_default_zone.zone_name; \
^~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1287:1: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
ZONE_GET_NAME(SO_SYN_MALLOC, malloc_get_zone_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1283:14: note: expanded from macro 'ZONE_GET_NAME'
return vg_default_zone.zone_name; \
^~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1286:1: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
ZONE_GET_NAME(VG_Z_LIBC_SONAME, malloc_get_zone_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1283:14: note: expanded from macro 'ZONE_GET_NAME'
return vg_default_zone.zone_name; \
^~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1287:1: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
ZONE_GET_NAME(SO_SYN_MALLOC, malloc_get_zone_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
m_replacemalloc/vg_replace_malloc.c:1283:14: note: expanded from macro 'ZONE_GET_NAME'
return vg_default_zone.zone_name; \
^~~~~~~~~~~~~~~~~~~~~~~~~

No regressions on OS X 10.10

Before:

== 596 tests, 219 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 596 tests, 219 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15712 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
0bbeecd2af34eaf4c852758d050ac9c8154157a9 15-Oct-2015 rhyskidd <rhyskidd@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix typo in malloc_get_zone_name() intercept. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15703 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
fa37d5b0244198bcd68cfac458a3beb7e424aab6 04-Oct-2015 rhyskidd <rhyskidd@a5019735-40e9-0310-863c-91ae7b9d1cf9> Plumb malloc_zone_memalign() through malloc_zone_t struct on OS X. No regressions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15698 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
77ae9992c9acc09fdab63e1bc951bea61e719b1e 09-Aug-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Consistently use exit code 1 (== POSIX's EXIT_FAILURE) if things
go wrong. As we can tell from the error messages what whent wrong
there is no need to have different exit codes to distinguish.
Spotted by Matthias Schwarzott.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15515 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
8eb8bab992e3998c33770b0cdb16059a8b918a06 21-Jul-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Bug 345248 - add support for Solaris OS in valgrind

Authors of this port:
Petr Pavlu setup@dagobah.cz
Ivo Raisr ivosh@ivosh.net
Theo Schlossnagle theo@omniti.com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
ad4e979f408239dabbaae955d8ffcb84a51a5c85 05-Jul-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
26ed419d60369d0545510eba0832566e24452e1e 04-Nov-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Adds initial support for AArch64 (arm64) on Android. Small programs
(/system/bin/ls, /system/bin/date) run. Still to do:

* enable more malloc/free intercepts

* enable wrappers for ashmem and binder syscalls

* check to see if any special ioctl support is required for ARM Mali GPUs



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14690 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
ef93463730b79d68adcb9f865123544e0299e390 02-Sep-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a ( that was missed in r14419 (Prepare to change the default for
--read-inline-info from =no to =yes)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14424 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
347a481512d1e9adb8f195a5cbec850215a1ec05 01-Sep-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Prepare to change the default for --read-inline-info from =no to =yes

The interception/replacements functions should preferrably not
depend on the value of --read-inline-info.
The idea is to change the default from no to yes.
Depending on the no or yes, some intercept/replacement functions
that are inlined will be shown or not shown in stacktraces.

To have such stack traces not depending on the value of --read-inline-info,
such functions should either be marked as
noinline
or be defined as macros.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14419 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
7817ee4856cf0fec2f168c8f1c8b82b6af0feab1 25-Jun-2014 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add intercepts for more OSX 10.9 malloc_zone functions:
malloc_default_purgeable_zone malloc_create_zone
malloc_zone_check malloc_zone_register malloc_zone_unregister
malloc_set_zone_name malloc_get_zone_name



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14100 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
9c6b05db45362b1afb981aa8298ab12ab4027b1a 27-Dec-2013 dejanj <dejanj@a5019735-40e9-0310-863c-91ae7b9d1cf9> mips32: Adding mips32/Android support to Valgrind.

Necessary changes to Valgrind to support mips32 on Android.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13767 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
c271cda855fcf9a2ef6ce43b0011d03b63e83f12 02-Sep-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> MacOS only: fix somee compiler complaints about casting from pointers
and integers of a different size.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13525 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
cf9e1973453f3bcc4cea9e5e943f10101bc3740b 04-Apr-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Solve false negative for various malloc replaced functions arguments

The replacement functions are running on the simulated CPU.
The code on the simulated CPU does not necessarily use
all arguments. E.g. args can be ignored and/or only given
to a NON SIMD call.
The definedness of such 'unused' arguments will not be verified
by memcheck.
A call to 'trigger_memcheck_error_if_undefined' allows
memcheck to detect such errors for the otherwise unused args.
Apart of allowing memcheck to detect an error, the function
trigger_memcheck_error_if_undefined has no effect and
has a minimal cost for other tools replacing malloc functions.

(suggestion of the 'no operation check' from Julian).

tested on f12/x86, debian6/amd64, f18/ppc64
Note that some Darwin specific code has been modified
in coregrind/m_replace_malloc/vg_replace_malloc.c.
(Some of) this code has not been compiled (no access to a
Darwin system). The code changed is trivial, so there is
some chance it will compile and even maybe work.

Added a new test verifying that various malloc related
functions undefined args are triggering an error in memcheck.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13361 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
5d5dd8e6b7ff782fc89f5b96cecf04839742882b 05-Aug-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> 301265 - add x86 support to Android build

Patch by Dragos Tatulea.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12835 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
1e470b5ec96bdd4fb46750d4e2e596e194af56fe 11-May-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix 219156 support static malloc or alternate malloc lib (e.g. tcmalloc) with new option --soname-synonyms

* pub_tool_redir.h : define the prefix to be used for "soname synonym"
place holder
* vg_replace_malloc.c : define synonym place holder for malloc related
functions
* m_redir.c : when detecting a soname synonym place holder redir spec, search
in clo_soname_synonyms if there is a synonym pattern.
If yes, replace the soname pattern. If not, ignore the redir spec.
* various files: implement or document the new clo --soname-synonyms
* new test memcheck/tests/static_malloc.vgtest



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12559 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
21b7ab237c6d3bcfa2924d35d1bc43a4ebe6dea8 22-Apr-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Kludge around a compiler warning, and add explanatory comment.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12526 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
cce48f8ca0acec17ce1463cd2c4f3bd760057ca9 11-Apr-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Android's libc includes advertise a "malloc_usable_size", but the
libc.so contains no such symbol; rather a "dlmalloc_usable_size"
(great, huh :-) So intercept that too, on Android.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12498 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
eb83f6c675d04a1dc955dacee16af3dffbe2fdc2 23-Feb-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement malloc_size for the vg_default_zone on Darwin.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12399 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
4b3a74204894e943c43cb8e8aae39d813040702c 24-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix #284384 (clang 3.1 -Wunused-value warnings in valgrind.h,
memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR
into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value
of the former would be unused. (Bart Van Assche, bart.vanassche@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12226 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
052f591f8a373549aedb12fd3515a9e0c86bd8a9 05-Oct-2011 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Declare _exit as "noreturn". This will avoid a GCC warning.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12106 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
731f9cf9fd4d507b44f1a0fdc2d3b8e8efae02e3 21-Sep-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add initial support for Mac OS X 10.7 (Lion). Tracked by bug #275168.

* configure.in support

* new supp file darwin11.supp

* comment out many intercepts in mc_replace_strmem.c and
vg_replace_malloc.c that are apparently unnecessary for Darwin

* add minimal handling for the following new syscalls and mach traps:
mach_port_set_context
task_get_exception_ports
getaudit_addr
psynch_mutexwait
psynch_mutexdrop
psynch_cvbroad
psynch_cvsignal
psynch_cvwait
psynch_rw_rdlock
psynch_rw_wrlock
psynch_rw_unlock
psynch_cvclrprepost

* wqthread_hijack on amd64-darwin: deal with
tst->os_state.pthread having an apparently different offset,
which caused an assertion failure

* m_debuginfo: for 32 bit processes on Lion, use the DebugInfoFSM
cleanup added in r12041/12042 to handle apparently new dyld
behaviour, which is to map text areas r-- first and only
vm_protect them later to r-x.



The following cleanups remain to be done

* remove apparently pointless, commented out wrapper macro
invokations in mc_replace_strmem.c, eg

//MEMMOVE(VG_Z_DYLD, memmove)

(or determine that they are still necessary, and uncomment)


* ditto in vg_replace_malloc.c, plus general VGO_darwin cleanups
there


* write proper syscall wrappers for
mach_port_set_context
task_get_exception_ports
getaudit_addr
psynch_mutexwait
psynch_mutexdrop
psynch_cvbroad
psynch_cvsignal
psynch_cvwait
psynch_rw_rdlock
psynch_rw_wrlock
psynch_rw_unlock
psynch_cvclrprepost
These are currently just no-ops and may be causing Memcheck to
report false undef-value errors


* figure out why it doesn't work properly unless built with gcc-4.2 on
Lion.

gcc-4.2 is the "normal" gcc (i686-apple-darwin11-gcc-4.2.1). Plain
gcc is the hybrid gcc-front-end clang-back-end thing
(i686-apple-darwin11-llvm-gcc-4.2). Whereas on Snow Leopard, plain
gcc is the normal gcc.

The symptoms of the failure are that wqthread_hijack in
syswrap-amd64-linux.c hits this /*NOTREACHED*/ vg_assert(0); right
at the end (you need a pretty complex threaded app to trigger this),
which makes me think that either ML_(wqthread_continue_NORETURN) or
call_on_new_stack_0_1 do return, which they are not expected to.


* figure out if some of the uninitialised value errors reported in
system libraries on are caused by Memcheck being confused by LLVM
generated code, as per bug #242137



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12043 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
3c9444598b4b8e9645a5e6c0456aa1acd62058a1 05-Sep-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> For intercepts in libc and the dynamic linker (ld.so or dyld), split
the Linux and Darwin definitions so they are in completely separate
ifdefs -- iow, remove any definitions that are common to both. This
gives some duplication, but the upside is that it is now possible to
edit the Darwin intercepts without fear of breaking the Linux ones.
This will be important when it comes to supporting OSX 10.7.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12009 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
96044842731e581702c9ed4104d2949fcde20fd8 18-Aug-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Extend the behavioural-equivalence-class mechanism for redirection
functions to include the ability to give a priority to each function,
as well as a tag indicating its behavioural class. Add logic in
m_redir.c to resolve conflicting redirections with the same eclass but
different priorities by preferring the redirection with the higher
priority. Use all of the above in mc_replace_strmem.c, to cause a
conflict between redirections for "memcpy" and "memcpy@GLIBC_2.2.5" to
be resolved in favour of the latter (the non-overlap-checking
version).

This is all related to the massive swamp that is #275284.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11991 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
7696726f188b4b50dc792a2b351bf7e162517ba9 17-Aug-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Un-break the build on OSX following r11985.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11986 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
bd2cff29a38ddf72c3f5c675dc68c6f5ba8d3c1a 16-Aug-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix for #275284 (initial fix, at least). Will break OSX; fix
to follow.

* add behavioural eclass tags for most functions in
mc_replace_strmem.c and vg_replace_malloc.c.

* add a wrapper for strspn() (see bug 270925)

* coregrind/m_redir.c: add logic to use eclass tags for
resolving conflicting redirections. Improve debug
printing in that situation.

* mc_replace_strmem.c: add a wrapper for "__GI___strcasecmp_l".
Gark. Is this correct? Does __GI___strcasecmp_l behave the
same as __GI_strcasecmp_l and strcasecmp_l ?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11985 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
4966542d95689e822685acd539181d117103ecda 12-Jul-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Un-break the build on most platforms following r11888. Oops.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11889 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
126e82d6275be490a1d0ea608d6a860976bba0cb 12-Jul-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix up preload code so that on Android it doesn't try to call anything
else -- that seems to give a runtime link failure. In particular,
avoid calling _exit, getpagesize or __libc_freeres.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11887 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
6e9de463ef677f093e9f24f126e1b11c28cf59fd 28-Jun-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
575ce8ef8fa86a502dabe152293320676922dcfe 15-May-2011 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of the remaining "set but not used" warnings reported by gcc 4.6 by
swapping the roles of the VALGRIND_DO_CLIENT_REQUEST() and
VALGRIND_DO_CLIENT_REQUEST_EXPR() macros. Also, many __attribute__((unused))
declarations on variables have been eliminated. Closes #269778.

Note: so far this patch has been tested on x86/Linux, amd64/Linux and
ppc64/Linux but not yet on any other supported CPU/OS combination.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11755 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
c7ffc94890e120c72d5802487b1092425323dc02 28-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
a6f76eebd1d0bca59ca88b98e88e909086e8c9fa 11-Oct-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove some fluff detected by llvm-2.8 (clang):

- "*(int *)0 = " is apparently ignored by LLVM for who-knows-why
reason. Cast the zero to a volatile int * instead.

- remove an unused function that gcc failed to mention was unused
(why? because it was marked __attribute__((noreturn)) ?)

As an aside, clang/llvm-2.8 seemed to be able to successfully
compile Valgrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11429 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
9cdf9623a0328f09103b136bc8f7acfd1d5b906e 30-Jul-2010 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use VALGRIND_PRINTF to print the first line of the message so that
we only get one copy of the backtrace. Reported in bug #246258.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11244 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
59570ffbe31930ab4d678754daaeec0715117a3d 01-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
d55f0d924062c7b5b3453242a6f9611bd5ce7458 03-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> With the recent VG_(message) change,
VALGRIND_{PRINTF,PRINTF_BACKTRACE,INTERNAL_PRINTF} were no longer appending
newlines. This meant that --trace-malloc=yes spewed everything onto a
single line, among other things.

Rather than adding the newline back in, I chose to offically change their
behaviour to not add the newlines, as this is more flexible (and the reason
for the underlying VG_(message) change). I updated all the relevant places
I could find.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10694 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
8f105fa797786a8e0acb1dcc614c81ca4a5578be 24-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fixed bug 149878 (calloc overflow). This disables some of the calloc silly
arg checking, but that's no great loss.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10578 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
2c4e5358db11e4d69efb7d9c3ef2baa4a87af220 29-Jun-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a comment.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10383 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
f76d27a697a7b0bf3b84490baf60623fc96a23af 28-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts. So instead I just took the diff between
the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
e74fbdf7d82f4a874646e51d4732325f6ad243f2 19-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> DARWIN sync: malloc_usable_size return value should be SizeT.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9984 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
d2597c22ffe4d197b9f078212d8db1a789f47275 19-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> DARWIN sync: wibble.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9983 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
4c245e595b9f6300d3120408ca873f7115d9cc7d 16-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix all the non-VEX problems identified with the Clang Static Analyzer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9416 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
8b140dee891a850c09d27f316df913acc7d7bae7 17-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> In the core, include malloc_usable_size() as one of the functions that must
be replaced if malloc() et al are replaced by a tool. This is because
different tools implement the function in different ways.

Add an appropriate malloc_usable_size() replacement to each of Memcheck,
Helgrind, DRD, Ptrcheck, Massif.

Update memcheck/tests/malloc_usable and add massif/tests/malloc_usable.

Merged from the DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9193 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
e61546621e9bca129420399d7c552f8f63c93509 10-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge part of r9129 (factor out duplicated Z-encodings of names) from the
DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9130 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
ddc00dde46e4f556d7ec9bf1a1a1e4434bef63ac 27-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make Memcheck work sanely on AIX5.3 (again):

* Don't intercept putenv/getenv/setenv. Causes a lot of whinging
about missing TOC pointers.

* Add 'strcmp' to the bundle of 4 functions intercepted in all
objects.

* xlc now seems to route calls through to malloc_common, free_common,
calloc_common, realloc_common, memalign_common in libc. Intercept
those names too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7241 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
a610f530e02397519957a7663adf1bb4de92c07d 16-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't crap out when malloc_stats is called; instead just have a no-op
implementation of it. Fixes #145559.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7168 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
2682038bff02f29f5077ef99f1d8e30463cf6ba4 02-May-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix regression in new/new[]/delete/delete[] intercepts for gcc-2.96.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6726 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
e66f2e09ec1aa9bab7a0fd6b02a6a6150ea85190 30-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge (from 3_2_BRANCH) r6457/8 (Support 64k pages on ppc32/64-linux
(Jakub Jelink, Dave Nomura) )



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6459 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
ec92a0765980ae931b59642e3a2b2ac310189b23 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r6146:

Generally tidy up, and add bindings for both gcc and xlc's C/C++
libraries on AIX.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6280 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
4cfea4f9480393ed6799db463b2e0fb8865a1a2f 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86. Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
ceb026640b0b5808eba0c0e7e2f898d0ce56ec61 08-Jul-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Trivial implementation for malloc_trim, thanks to Eero Tamminen.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5983 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
7c1fa878a4ae368a84b680e8c881222e2ff2de51 21-May-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Back out r5595: the redirections deleted there are in fact used by
gcc 2.96 on R H 7.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5908 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
9af10a1c0d1b8897195ccfbc6dc46d8113d77153 01-Feb-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change the number of client request args from 4 to 5 as that may
be useful in future.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5603 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
facb3ebc64903b14f5af1f05268668ffde207305 26-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of some will-never-be-used redirections -- names which are in
libstdc++ but which are not (C++) mangled.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5595 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
cf64bd259fa9be4913f57319f59c0b143df8dd1e 19-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Consistently call init() before doing any MALLOC_TRACE, since the
latter depends on function pointers obtained by the former.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5550 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
0ec07f32bbbb209d749b9974408e6f025ad40b31 12-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive. This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
93fe3b2893ca401903646b856f9702c9ab394963 21-Dec-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Renamed coregrind.h to pub_core_clreq.h and introduced pub_tool_clreq.h to
be consistent with the module naming scheme.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
8f92409f2a4c9b3d7207b135a65998d8bfd4e1e3 13-Oct-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use an soname of libc.so* for libc redirects so that we catch a wider
range of libc's such as uclibc as well as glibc. Fixes bug 114289.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4916 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
088bfb456af4ad2d1d0962f41e91d029bdec993e 17-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Partial implementation of mallinfo(). It still puts zero in all
the fields, but all the plumbing is now there so that m_mallocfree.c
can fill them in.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4441 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Final commit for the initial modularisation pass:

- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
12771097ad146cde1763b83eca63e55fc8d60ae2 18-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Created coregrind.h, a counterpart to valgrind.h containing the internal
client requests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3927 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
16eeb4eaf602c7376f401a01f4544293b8ad5898 16-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> A cleanup of the redirection stuff.

- Renamed VG_INTERCEPT as VG_REPLACE_FUNCTION to make its purpose
clearer.

- Renamed VG_WRAPPER as VG_NOTIFY_ON_LOAD to make its purpose cleare.
Started calling that stuff "load notification".

- Moved various things into m_redir.c, a much more sensible place for
them. This reduced the number of exported functions overall. Renamed
intercept_demangle() as Z_decode() as part of this.

- Improved the documentation of this stuff, especially in
pub_core_redir.c.

- Got --run-libc-freeres=yes working again. It was doing nothing.

- Renamed vg_inject.so as vg_preload_core.so to match
vg_preload_<tool>.so

- Renamed vg_intercept.c as vg_preloaded.c. (I kept the "vg_" prefix
because this filename can appear in stack traces, so the "vg_" is a
useful hint for users that it belongs to Valgrind.)

- Removed all the Memcheck-specific calls to add_redirect_sym_to_sym()
from VG_(setup_redirect_table)(), instead using VG_REPLACE_FUNCTION in
mac_replace_strmem.c, just like vg_replace_malloc.c. This is the
right way to do it. This required moving some of
coregrind/pub_core_redir.h into the newly added
include/pub_tool_redir.h. add_redirect_sym_to_sym() is no longer
used...

- Now only handing off symbols to m_redir for inspection/decoding after
they have been deemed to be interesting by the symbol table reader.

- Factored out commonality between the add_redirect_*_to_* functions
into add_redirect_X_to_X().

- Added "Zh", meaning '-' ('h' for "hyphen"), to the Z-decoding scheme,
to handle sonames like "ld-linux-x86-64.so.2".

- Added a FAQ explaining the newly found issue of glibc aliasing
sometimes causing the wrong function name to appear in stack traces.

- Added a new regtest strchr.c. It's possible this will fail on some
platforms. If so, an alternative output file can be provided, but
I'd like to see it in practice first.

It's possible that there will be minor breakage on other
platforms/setups, but it should be minimal and easily fixable.

Plus some ordinary cleanups in symtab.c:

- Removed the old optimisation from VG_(addStr)() whereby it kept track
of the previous 5 added strings and avoiding duplicating any of them.
Turns out it was barely having any effect any more, and just
complicated things.

- Made read_symtab() more readable, by introducing a new variable
"sym_name" and introducing the auxiliary function
is_symbol_interesting().

- renamed the module variable 'segInfo' as 'segInfo_list' to make it
more obvious it's a module variable and not just some ordinary local
variable (which was an easy mistake to make).

-----------------------------------------------------------------------------

XXX: [later] remove add_redirect_sym_to_sym, and everything related to
X_to_sym? (ie. only need X_to_addr)

XXX: better function names? all those 'resolved' names...
[later...]




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3916 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
31721244e00e3e754a40125896f82b02f536c955 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove the hard-coding of "_vgi_" as the intercept prefix in
vg_replace_malloc.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3882 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
af1d7dfc9412c09d24ea10118f3fd1082f92e49d 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Having moved VG_(arena_strdup)() out of core.h, core.h no longer
needs to #include pub_core_mallocfree.h. As a result, we need
to #include it explicitly everywhere else.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3881 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
da325d921b976f48a73188024dfd195aa67c19d4 11-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move declaration of "struct vg_mallocfunc_info" from core.h into
pub_core_replacemalloc.h, to reduce its exposure.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3662 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c
717cde5bda18d17792d1994c61b6a27408b4b4a7 10-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the malloc/free stuff into two modules: m_mallocfree for the
malloc/free implementation, and m_replacemalloc with the stuff for the tools
that replace malloc with their own version. Previously these two areas of
functionality were mixed up somewhat.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3648 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_replacemalloc/vg_replace_malloc.c