<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/libbacktrace, branch replicant-10</title>
<subtitle>Fork of system/core
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/'/>
<entry>
<title>Fix pc/function name for signal handler frame.</title>
<updated>2019-04-15T21:14:56+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2019-04-12T02:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=82866421b8b357b18c71e2b560c81c95ab925934'/>
<id>82866421b8b357b18c71e2b560c81c95ab925934</id>
<content type='text'>
This refactors the step function slightly to split it up into
distinct pieces since the code needs to handle a signal handler
versus normal step slightly differently.

Add a new error for an invalid elf.

Modify libbacktrace code to handle new error code.

Bug: 130302288

Test: libbacktrace/libunwindstack unit tests.
Change-Id: I3fb9b00c02d2cf2cc5911541bba0346c6f39b8e6
Merged-In: I3fb9b00c02d2cf2cc5911541bba0346c6f39b8e6
(cherry picked from commit d11ed86d65e870c5ea0d4918693376d474dbfe7d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This refactors the step function slightly to split it up into
distinct pieces since the code needs to handle a signal handler
versus normal step slightly differently.

Add a new error for an invalid elf.

Modify libbacktrace code to handle new error code.

Bug: 130302288

Test: libbacktrace/libunwindstack unit tests.
Change-Id: I3fb9b00c02d2cf2cc5911541bba0346c6f39b8e6
Merged-In: I3fb9b00c02d2cf2cc5911541bba0346c6f39b8e6
(cherry picked from commit d11ed86d65e870c5ea0d4918693376d474dbfe7d)
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Check for data races when reading JIT/DEX entries."</title>
<updated>2019-04-12T12:55:50+00:00</updated>
<author>
<name>David Srbecky</name>
<email>dsrbecky@google.com</email>
</author>
<published>2019-04-05T18:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=e5c4d62ba3fca09fed86ec605542b2be74a59851'/>
<id>e5c4d62ba3fca09fed86ec605542b2be74a59851</id>
<content type='text'>
This reverts commit 85b5fecec920208ec43b42488f08d4c2e5aaeda2.

Reason for revert: Breaks ART tests, reverting to investigate.
Exempt-From-Owner-Approval: Revert.

(cherry picked from commit b9cc4fbb268652744c812415cb2e5d1fbe04879a)

Bug: 130406806
Change-Id: I634e37060b97484d627fc544e3b406fd90aaa784
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 85b5fecec920208ec43b42488f08d4c2e5aaeda2.

Reason for revert: Breaks ART tests, reverting to investigate.
Exempt-From-Owner-Approval: Revert.

(cherry picked from commit b9cc4fbb268652744c812415cb2e5d1fbe04879a)

Bug: 130406806
Change-Id: I634e37060b97484d627fc544e3b406fd90aaa784
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for data races when reading JIT/DEX entries.</title>
<updated>2019-03-29T14:01:32+00:00</updated>
<author>
<name>David Srbecky</name>
<email>dsrbecky@google.com</email>
</author>
<published>2018-02-23T18:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=85b5fecec920208ec43b42488f08d4c2e5aaeda2'/>
<id>85b5fecec920208ec43b42488f08d4c2e5aaeda2</id>
<content type='text'>
Update the entries only when the list is modified by the runtime.

Check that the list wasn't concurrently modified when being read.

Bug: 124287208
Test: libunwindstack_test
Test: art/test.py -b --host -r -t 137-cfi
Change-Id: I87ba70322053a01b3d5be1fdf6310e1dc21bb084
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the entries only when the list is modified by the runtime.

Check that the list wasn't concurrently modified when being read.

Bug: 124287208
Test: libunwindstack_test
Test: art/test.py -b --host -r -t 137-cfi
Change-Id: I87ba70322053a01b3d5be1fdf6310e1dc21bb084
</pre>
</div>
</content>
</entry>
<entry>
<title>[libbacktrace] Modernize code to use override keyword</title>
<updated>2019-03-25T09:22:42+00:00</updated>
<author>
<name>Yi Kong</name>
<email>yikong@google.com</email>
</author>
<published>2019-03-25T09:22:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=13f2d18e308b94bc0edb1a31113fde1fca7ae8a8'/>
<id>13f2d18e308b94bc0edb1a31113fde1fca7ae8a8</id>
<content type='text'>
Generated by clang-tidy.

Test: m checkbuild
Change-Id: I4506a9624002250117148413ea6990749cc1a4da
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generated by clang-tidy.

Test: m checkbuild
Change-Id: I4506a9624002250117148413ea6990749cc1a4da
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix copy / move behaviour of Maps object.</title>
<updated>2019-03-05T13:05:36+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2019-02-27T18:00:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=3d67d347f5322ca6d4aeac790368bff1f50e27b1'/>
<id>3d67d347f5322ca6d4aeac790368bff1f50e27b1</id>
<content type='text'>
Currently, moving or copying a Maps object leads to double free of MapInfo.

Even moving a Maps object  did not prevent this, as after a move
the object only has to be in an "unspecified but valid state", which can
be the original state for a vector of raw pointers (but not for a vector
of unique_ptrs).

Changing to unique_ptrs is the most failsafe way to make sure we never
accidentally destruct MapInfo.

Test: atest libuwindstack_test
      Failed LocalUnwinderTest#unwind_after_dlopen which also fails at master.

Change-Id: Id1c9739b334da5c1ba532fd55366e115940a66d3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, moving or copying a Maps object leads to double free of MapInfo.

Even moving a Maps object  did not prevent this, as after a move
the object only has to be in an "unspecified but valid state", which can
be the original state for a vector of raw pointers (but not for a vector
of unique_ptrs).

Changing to unique_ptrs is the most failsafe way to make sure we never
accidentally destruct MapInfo.

Test: atest libuwindstack_test
      Failed LocalUnwinderTest#unwind_after_dlopen which also fails at master.

Change-Id: Id1c9739b334da5c1ba532fd55366e115940a66d3
</pre>
</div>
</content>
</entry>
<entry>
<title>procinfo: Read inode number from /proc/&lt;pid&gt;/maps</title>
<updated>2019-02-11T01:38:08+00:00</updated>
<author>
<name>Sandeep Patil</name>
<email>sspatil@google.com</email>
</author>
<published>2019-01-31T01:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=f31c70989b78ca40bda969195a4c92a1060789d5'/>
<id>f31c70989b78ca40bda969195a4c92a1060789d5</id>
<content type='text'>
Adjust all callbacks to include the inode number as well.

Fixes: 123532375
Test: libprocinfo_test
Test: libdmabufinfo_test
Test: libmeminfo_test

Change-Id: I71fd75d90d5ee44585011c5ae654a1dd7e185458
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adjust all callbacks to include the inode number as well.

Fixes: 123532375
Test: libprocinfo_test
Test: libdmabufinfo_test
Test: libmeminfo_test

Change-Id: I71fd75d90d5ee44585011c5ae654a1dd7e185458
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix offsets when shared lib split across maps.</title>
<updated>2018-12-18T19:22:14+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2018-12-14T00:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=a09c4a6ff2806644c8baf0b93415078fa252b0e9'/>
<id>a09c4a6ff2806644c8baf0b93415078fa252b0e9</id>
<content type='text'>
The linker was modified so that a shared library has a read-only
map, then a read-execute map to represent the whole shared library.
When backtraces are created, then the offsets are set incorrectly
for backtraces. For example, all backtraces wind up with an offset now,
and a shared library loaded out of an apk shows the wrong offset.

Changes:
- Fix the FormatFrame function which was putting the offset before the
  map name.
- Refactor the Maps and MapInfo classes to keep track of the previous map
  instead of all maps. This was the only map that was ever needed.
- Modify the unwind_for_offline tool to capture both the read-only and
  read-execute map when using the read-only segment option.

Bug: 120981155

Test: Updated unit tests pass.
Test: Unwinds on device don't show the offsets everywhere any more.
Change-Id: I75b3727221be9c20316dfdcd7a1c6d242d7ce948
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linker was modified so that a shared library has a read-only
map, then a read-execute map to represent the whole shared library.
When backtraces are created, then the offsets are set incorrectly
for backtraces. For example, all backtraces wind up with an offset now,
and a shared library loaded out of an apk shows the wrong offset.

Changes:
- Fix the FormatFrame function which was putting the offset before the
  map name.
- Refactor the Maps and MapInfo classes to keep track of the previous map
  instead of all maps. This was the only map that was ever needed.
- Modify the unwind_for_offline tool to capture both the read-only and
  read-execute map when using the read-only segment option.

Bug: 120981155

Test: Updated unit tests pass.
Test: Unwinds on device don't show the offsets everywhere any more.
Change-Id: I75b3727221be9c20316dfdcd7a1c6d242d7ce948
</pre>
</div>
</content>
</entry>
<entry>
<title>[libbacktrace] Fix sign-compare warning</title>
<updated>2018-12-17T20:51:36+00:00</updated>
<author>
<name>Yi Kong</name>
<email>yikong@google.com</email>
</author>
<published>2018-12-17T20:51:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=c91e6f9e5fcc9e4965ddd0d3b178edb0287cd930'/>
<id>c91e6f9e5fcc9e4965ddd0d3b178edb0287cd930</id>
<content type='text'>
static_cast GetThreadId result to pid_t.

Test: m checkbuild
Change-Id: Id3f541c1cb6cad9471e0cedf2ca49ce0fc38df38
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
static_cast GetThreadId result to pid_t.

Test: m checkbuild
Change-Id: Id3f541c1cb6cad9471e0cedf2ca49ce0fc38df38
</pre>
</div>
</content>
</entry>
<entry>
<title>Verify that the elf matches the expected arch.</title>
<updated>2018-10-30T01:08:09+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2018-10-24T00:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=4568f4bc0f116f097a13b1d931de93cf525ae204'/>
<id>4568f4bc0f116f097a13b1d931de93cf525ae204</id>
<content type='text'>
To avoid a case where a malicious app might try and trick the system to
create an elf and register object that mismatches, always verify that they
are the same arch.

Test: Ran unit tests.
Change-Id: I66978e9e02f8e4f396856912e7019528ead4838e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid a case where a malicious app might try and trick the system to
create an elf and register object that mismatches, always verify that they
are the same arch.

Test: Ran unit tests.
Change-Id: I66978e9e02f8e4f396856912e7019528ead4838e
</pre>
</div>
</content>
</entry>
<entry>
<title>Always init gnu_debugdata interface if it exists.</title>
<updated>2018-10-23T19:13:54+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2018-10-23T19:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=e8c4ecf49e87b082610055e279f889d2d1311b71'/>
<id>e8c4ecf49e87b082610055e279f889d2d1311b71</id>
<content type='text'>
Every real call always sets the value to true to init the gnu_debugdata
interface, so remove this parameter.

Test: Builds, unit tests pass.
Change-Id: I07fb3adbbd5b65b51c0dc7608561e820a5095051
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Every real call always sets the value to true to init the gnu_debugdata
interface, so remove this parameter.

Test: Builds, unit tests pass.
Change-Id: I07fb3adbbd5b65b51c0dc7608561e820a5095051
</pre>
</div>
</content>
</entry>
</feed>
