<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/libbacktrace/UnwindMap.cpp, branch master</title>
<subtitle>Patches not merged yet, used for building and testing them
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/'/>
<entry>
<title>Change all uintptr_t to uint64_t in API.</title>
<updated>2018-01-19T01:26:20+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2018-01-18T19:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=7937a36c8e24ef2dc5105a2a6b67f395934b2e2f'/>
<id>7937a36c8e24ef2dc5105a2a6b67f395934b2e2f</id>
<content type='text'>
In order to support the offline unwinding properly, get rid of the
usage of non-fixed type uintptr_t from all API calls.

In addition, completely remove the old local and remote unwinding code
that used libunwind.

The next step will be to move the offline unwinding to the new unwinder.

Bug: 65682279

Test: Ran unit tests for libbacktrace/debuggerd.
Test: Ran debuggerd -b on a few arm and arm64 processes.
Test: Ran crasher and crasher64 and verified tombstones look correct.
Change-Id: Ib0c6cee3ad6785a102b74908a3d8e5e93e5c6b33
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to support the offline unwinding properly, get rid of the
usage of non-fixed type uintptr_t from all API calls.

In addition, completely remove the old local and remote unwinding code
that used libunwind.

The next step will be to move the offline unwinding to the new unwinder.

Bug: 65682279

Test: Ran unit tests for libbacktrace/debuggerd.
Test: Ran debuggerd -b on a few arm and arm64 processes.
Test: Ran crasher and crasher64 and verified tombstones look correct.
Change-Id: Ib0c6cee3ad6785a102b74908a3d8e5e93e5c6b33
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch libbacktrace new unwinder.</title>
<updated>2017-10-30T20:37:50+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-10-17T21:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=086baf981d696cb80c564df9c34affdcd2458504'/>
<id>086baf981d696cb80c564df9c34affdcd2458504</id>
<content type='text'>
Update the backtrace leak tests to share a map since this is the most
common way it will be used, and it runs much faster.

Remove the CreateNew functions, and references to them.

Remove benchmarks of CreateNew functions.

Test: Builds, ran new unit tests, ran art tests.

Change-Id: I4a25a412f1a74c6d43aebbebbf32ead20ead8f94
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the backtrace leak tests to share a map since this is the most
common way it will be used, and it runs much faster.

Remove the CreateNew functions, and references to them.

Remove benchmarks of CreateNew functions.

Test: Builds, ran new unit tests, ran art tests.

Change-Id: I4a25a412f1a74c6d43aebbebbf32ead20ead8f94
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup the libbacktrace interface a bit.</title>
<updated>2017-07-19T22:36:32+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-07-19T21:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=96722b0fa48524e03659c0a3d579f8ef4f1641ba'/>
<id>96722b0fa48524e03659c0a3d579f8ef4f1641ba</id>
<content type='text'>
- Change the field name load_base to load_bias (which is what it really is).
- Add a rel_pc field so that callers do not need to compute it themselves.
- Remove the BacktraceMap::GetRelativePc() since nobody should need to
  compute this themselves.

Bug: 23762183

Test: Compiles and unit tests pass (debuggerd, libbacktrace).
Change-Id: I2cb579767120adf08c407a58f3c487ee3f2b45fc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Change the field name load_base to load_bias (which is what it really is).
- Add a rel_pc field so that callers do not need to compute it themselves.
- Remove the BacktraceMap::GetRelativePc() since nobody should need to
  compute this themselves.

Bug: 23762183

Test: Compiles and unit tests pass (debuggerd, libbacktrace).
Change-Id: I2cb579767120adf08c407a58f3c487ee3f2b45fc
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix race condition updating local map data.</title>
<updated>2016-06-17T06:28:11+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2016-06-15T22:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=3a14004c7f521cf2ca6dfea182fa7441e77c97e7'/>
<id>3a14004c7f521cf2ca6dfea182fa7441e77c97e7</id>
<content type='text'>
If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix use of uninitialized memory.</title>
<updated>2016-02-05T23:22:34+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2016-02-05T19:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=d4c884330c384bbb06f9a0d1fee2d2ae2086521c'/>
<id>d4c884330c384bbb06f9a0d1fee2d2ae2086521c</id>
<content type='text'>
When creating an UnwindMapLocal fails in the Build() function call,
the destructor for UnwindMap is called. Unfortunately, the map_cursor_
member variable has not been initialized, so the call to destroy it
winds up operating on garbage data.

Part of this is a result of a bad class hierarchy, so this refactors
the classes slightly, and properly initializes the map_cursor_ member
variable in the base class.

Bug: 26931578
Change-Id: I885596bf65e4ef63559cee2c56cd41576d5ecc1b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating an UnwindMapLocal fails in the Build() function call,
the destructor for UnwindMap is called. Unfortunately, the map_cursor_
member variable has not been initialized, so the call to destroy it
winds up operating on garbage data.

Part of this is a result of a bad class hierarchy, so this refactors
the classes slightly, and properly initializes the map_cursor_ member
variable in the base class.

Bug: 26931578
Change-Id: I885596bf65e4ef63559cee2c56cd41576d5ecc1b
</pre>
</div>
</content>
</entry>
<entry>
<title>Add offset to map data.</title>
<updated>2015-05-06T23:35:50+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2015-05-06T19:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=af67fb247540ef084a0b644e1d3bf225db4de6bd'/>
<id>af67fb247540ef084a0b644e1d3bf225db4de6bd</id>
<content type='text'>
Also, print the offset in the maps section.

Bug: 20864928
Change-Id: I71f005726e5ef73cf75bbcb8f829fd5127cb9d61
(cherry picked from commit 5c8856854de4ae7836fc1073d534f4b7b7a03eb9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, print the offset in the maps section.

Bug: 20864928
Change-Id: I71f005726e5ef73cf75bbcb8f829fd5127cb9d61
(cherry picked from commit 5c8856854de4ae7836fc1073d534f4b7b7a03eb9)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add load base to map for relocation packing.</title>
<updated>2015-05-01T23:04:24+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2015-05-01T22:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=329ed7dae49eba09bdf865dd999d1a7e73bb9687'/>
<id>329ed7dae49eba09bdf865dd999d1a7e73bb9687</id>
<content type='text'>
The new linker relocation packing support uses non-zero load bases,
so we better handle them properly.

Also print out the load base for a map if it's non-zero.

Bug: 20687795
Change-Id: Iec2d1db2051e7b4a278c1dfa57d745128a7f2974
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new linker relocation packing support uses non-zero load bases,
so we better handle them properly.

Also print out the load base for a map if it's non-zero.

Bug: 20687795
Change-Id: Iec2d1db2051e7b4a278c1dfa57d745128a7f2974
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor the code.</title>
<updated>2015-03-31T17:51:44+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2015-03-27T02:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=2c43cff01d1271be451671567955158629b23670'/>
<id>2c43cff01d1271be451671567955158629b23670</id>
<content type='text'>
The object hierarchy was confusing and convoluted. This removes
a lot of unnecessary code, and consolidates the BacktraceCurrent
and BacktraceThread code into BacktraceCurrent.

Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The object hierarchy was confusing and convoluted. This removes
a lot of unnecessary code, and consolidates the BacktraceCurrent
and BacktraceThread code into BacktraceCurrent.

Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae
</pre>
</div>
</content>
</entry>
<entry>
<title>Move map data into backtrace data proper.</title>
<updated>2015-02-06T23:00:09+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2015-02-06T21:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=12385e3ad085aa1ac06c26529b32b688503a9fcf'/>
<id>12385e3ad085aa1ac06c26529b32b688503a9fcf</id>
<content type='text'>
The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow getting an uncached process map.</title>
<updated>2014-08-05T02:21:23+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2014-08-05T00:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=dda47b786835ef3689f06e24650eb65176e2dc5e'/>
<id>dda47b786835ef3689f06e24650eb65176e2dc5e</id>
<content type='text'>
(cherry picked from commit f02593b0e61f8108449770094caa7bb39a646ec1)

Change-Id: I2012bf2dc553ebc663345b9eac6d794e80df9c00
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit f02593b0e61f8108449770094caa7bb39a646ec1)

Change-Id: I2012bf2dc553ebc663345b9eac6d794e80df9c00
</pre>
</div>
</content>
</entry>
</feed>
