Commit graph

11 commits

Author SHA1 Message Date
Christopher Ferris
63860cb8fd Malloc debug rewrite.
The major components of the rewrite:

- Completely remove the qemu shared library code. Nobody was using it
  and it appears to have broken at some point.
- Adds the ability to enable/disable different options independently.
- Adds a new option that can enable the backtrace on alloc/free when
  a process gets a specific signal.
- Adds a new way to enable malloc debug. If a special property is
  set, and the process has an environment variable set, then debug
  malloc will be enabled. This allows something that might be
  a derivative of app_process to be started with an environment variable
  being enabled.
- get_malloc_leak_info() used to return one element for each pointer that
  had the exact same backtrace. The new version returns information for
  every one of the pointers with same backtrace. It turns out ddms already
  automatically coalesces these, so the old method simply hid the fact
  that there where multiple pointers with the same amount of backtrace.
- Moved all of the malloc debug specific code into the library.
  Nothing related to the malloc debug data structures remains in libc.
- Removed the calls to the debug malloc cleanup routine. Instead, I
  added an atexit call with the debug malloc cleanup routine. This gets
  around most problems related to the timing of doing the cleanup.

The new properties and environment variables:

libc.debug.malloc.options
  Set by option name (such as "backtrace"). Setting this to a bad value
  will cause a usage statement to be printed to the log.

libc.debug.malloc.program
  Same as before. If this is set, then only the program named will
  be launched with malloc debug enabled. This is not a complete match,
  but if any part of the property is in the program name, malloc debug is
  enabled.

libc.debug.malloc.env_enabled
  If set, then malloc debug is only enabled if the running process has the
  environment variable LIBC_DEBUG_MALLOC_ENABLE set.

Bug: 19145921

Change-Id: I7b0e58cc85cc6d4118173fe1f8627a391b64c0d7
2016-01-25 10:54:21 -08:00
Josh Gao
0ac0cee0d1 Remove dlmalloc.
Bug: http://b/17207577
Change-Id: Ie009badca6deb1f91b27a4340b70cdd6bedff893
2016-01-25 10:14:35 -08:00
Elliott Hughes
59fc2e8557 Improve the 32-bit ABI documentation.
Change-Id: Ie5bfc8d6f7f3946100f653de0e006072e56e18d6
2015-12-19 09:36:16 -08:00
Dan Albert
1af434cc02 Add a hint about using --no-isolate for GDB.
Change-Id: Ib9df5ed986a1c4082c9c7cd793a4d670be21ca66
2015-09-18 13:17:02 -07:00
Duane Sand
a40a21110d Fix test steps for 64-bit bionic
Change-Id: Ibe76f22cdb5c0dbc69a24ffd0acffff89686ca35
2015-08-11 17:21:27 -07:00
Elliott Hughes
d3d018b2b4 Update README.md for running tests on the host.
Change-Id: Ib360d91bffd269e7acdb20ad33a7bd85345a1475
2015-04-01 12:16:56 -07:00
Dan Albert
79b9830b1d Markdown-ify 5137db3.
Most of these are just aesthetic, but the `_FILE_OFFSET_BITS` probably
would have rendered partly as italics and skipped some underscores.

GitHub's Markdown also doesn't identify our bug URLs as links, so mark
them explicitly.

Change-Id: I62be7542aa43929d847de2bad7d8d1ed3aaa640c
2015-01-09 15:29:46 -08:00
Elliott Hughes
0b1de06910 Add our LP32 ABI defects to the readme.
Change-Id: Id77a3dbf6b91243c57528ed86ca24100d8795907
2015-01-09 12:21:24 -08:00
Dan Albert
e66d57f532 Add documentation about checkbuild.
Change-Id: I2c2d06bc0dc3cdc58b5563f62889122b76f3c469
2014-11-12 17:08:38 -08:00
Dan Albert
472cce5c98 Fix some formatting so GitHub displays it nicely.
Change-Id: Id6ce9a61bebd98544c85e5780147715c73d0e78b
2014-10-10 17:14:37 -07:00
Dan Albert
efee1ce46a Improve documentation for testing and coverage.
Also rename HACKING.txt to README.md so it will display on the GitHub
mirror.

Change-Id: I70157a4ad262700212bf9afd87253d195c7013a9
2014-10-10 11:45:19 -07:00
Renamed from HACKING.txt (Browse further)