<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/base, 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>libbase: add ConsumePrefix/ConsumeSuffix.</title>
<updated>2020-03-13T22:30:46+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2019-05-03T16:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=124e1a0ea611be51c8b514e663c4528f10e032bc'/>
<id>124e1a0ea611be51c8b514e663c4528f10e032bc</id>
<content type='text'>
adb was already using ConsumePrefix, and now we have another would-be
user in cutils. (There appears to be one place in adb that should use
ConsumeSuffix, so I'm assuming we'll want that sooner or later.)

I've kept these inline because adb and google3's versions both were, and
I'm easily led.

Test: treehugger
Change-Id: I29d99032f6f6ccbfaefece59725db8afb02a4c87
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
adb was already using ConsumePrefix, and now we have another would-be
user in cutils. (There appears to be one place in adb that should use
ConsumeSuffix, so I'm assuming we'll want that sooner or later.)

I've kept these inline because adb and google3's versions both were, and
I'm easily led.

Test: treehugger
Change-Id: I29d99032f6f6ccbfaefece59725db8afb02a4c87
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix leak of mapped zip central directories</title>
<updated>2019-05-28T23:00:04+00:00</updated>
<author>
<name>Ryan Mitchell</name>
<email>rtmitchell@google.com</email>
</author>
<published>2019-05-28T22:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=d1531ac4e8dc8f57eddf06f1b4a9a93ca67a8ae0'/>
<id>d1531ac4e8dc8f57eddf06f1b4a9a93ca67a8ae0</id>
<content type='text'>
Memory mapping the central directory of specific APKs caused memory
mappings to build up over time because they were never unmapped
correctly. This is because MappedFile is not calling munmap with the
size of the data after aligning the mmap offset to a page boundary.

Bug: 133463863
Test: install APKs and verify that the entire mapped CD is unmaped
Test: ran aapt2 as daemon and confirmed that mapped CD is unmapped
Change-Id: Icb6cfebe0e8d67160fee34c5e6423d0f05de526b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Memory mapping the central directory of specific APKs caused memory
mappings to build up over time because they were never unmapped
correctly. This is because MappedFile is not calling munmap with the
size of the data after aligning the mmap offset to a page boundary.

Bug: 133463863
Test: install APKs and verify that the entire mapped CD is unmaped
Test: ran aapt2 as daemon and confirmed that mapped CD is unmapped
Change-Id: Icb6cfebe0e8d67160fee34c5e6423d0f05de526b
</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow operator!() on unique_fd</title>
<updated>2019-03-28T06:56:07+00:00</updated>
<author>
<name>Bernie Innocenti</name>
<email>codewiz@google.com</email>
</author>
<published>2019-03-28T06:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=7cb72c96b4d5ede1b5526a526ccb7dae0490bb0e'/>
<id>7cb72c96b4d5ede1b5526a526ccb7dae0490bb0e</id>
<content type='text'>
This catches a common mistake where client code checks for errors using
the common idiom that works for std::iostream and other file-like
classes:

  unique_fd fd = open(...);
  if (!fd) {
  }

Test: atest libbase_test
Test: m droid
Change-Id: I9629a7795537ecb3b57be9c741c06f80967e4cc2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This catches a common mistake where client code checks for errors using
the common idiom that works for std::iostream and other file-like
classes:

  unique_fd fd = open(...);
  if (!fd) {
  }

Test: atest libbase_test
Test: m droid
Change-Id: I9629a7795537ecb3b57be9c741c06f80967e4cc2
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge changes from topic "lpdumpd"</title>
<updated>2019-03-26T20:35:36+00:00</updated>
<author>
<name>Yifan Hong</name>
<email>elsk@google.com</email>
</author>
<published>2019-03-26T20:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=f959fffc1c8ce9fcf1665a2e39ab6add986d9e6e'/>
<id>f959fffc1c8ce9fcf1665a2e39ab6add986d9e6e</id>
<content type='text'>
* changes:
  libbase: realpath is wrapped with TEMP_FAILURE_RETRY
  liblp: Replace open with GetControlFileOrOpen
  init: expand prop in 'file'
  libcutils: android_get_control_file uses realpath.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* changes:
  libbase: realpath is wrapped with TEMP_FAILURE_RETRY
  liblp: Replace open with GetControlFileOrOpen
  init: expand prop in 'file'
  libcutils: android_get_control_file uses realpath.
</pre>
</div>
</content>
</entry>
<entry>
<title>libbase: realpath is wrapped with TEMP_FAILURE_RETRY</title>
<updated>2019-03-22T21:26:25+00:00</updated>
<author>
<name>Yifan Hong</name>
<email>elsk@google.com</email>
</author>
<published>2019-03-21T22:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=5f4cb8a24060da1bd60f0580848fa2e94ade3f0a'/>
<id>5f4cb8a24060da1bd60f0580848fa2e94ade3f0a</id>
<content type='text'>
Although man page for realpath doesn't say so, the bionic
implementation of realpath may exit with error code
EINTR. In such cases, retry.

Test: boots (sanity)
Change-Id: Ic5feb7152374a81bd2f475ad74c4bc8c3afb3a20
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although man page for realpath doesn't say so, the bionic
implementation of realpath may exit with error code
EINTR. In such cases, retry.

Test: boots (sanity)
Change-Id: Ic5feb7152374a81bd2f475ad74c4bc8c3afb3a20
</pre>
</div>
</content>
</entry>
<entry>
<title>[base] Convert Starts/Ends/Equals string functions to string_view</title>
<updated>2019-03-21T16:29:46+00:00</updated>
<author>
<name>Yurii Zubrytskyi</name>
<email>zyy@google.com</email>
</author>
<published>2019-03-20T00:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=59d876c7a2468c189edebf451cbc0debd2aced47'/>
<id>59d876c7a2468c189edebf451cbc0debd2aced47</id>
<content type='text'>
Test: UTs

Change-Id: I3751656d44e7a814488169c53d3e8af0da44f262
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: UTs

Change-Id: I3751656d44e7a814488169c53d3e8af0da44f262
</pre>
</div>
</content>
</entry>
<entry>
<title>Support zero-length mapped files</title>
<updated>2019-03-08T00:12:55+00:00</updated>
<author>
<name>Pirama Arumuga Nainar</name>
<email>pirama@google.com</email>
</author>
<published>2019-03-08T00:12:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=5d7f84144d04a9c145a44de3146b43b0119b3625'/>
<id>5d7f84144d04a9c145a44de3146b43b0119b3625</id>
<content type='text'>
Bug: http://b/119818070 "app crashes when reading asset of zero length"

Add support for zero-length mappings for the Windows code path as well.

Test: ran libbase_test on Windows under wine.
Change-Id: Iccb65fa800c636444100c9369f41e36d24a53a99
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: http://b/119818070 "app crashes when reading asset of zero length"

Add support for zero-length mappings for the Windows code path as well.

Test: ran libbase_test on Windows under wine.
Change-Id: Iccb65fa800c636444100c9369f41e36d24a53a99
</pre>
</div>
</content>
</entry>
<entry>
<title>Hopefully fix more darwin build breakage.</title>
<updated>2019-02-19T22:37:02+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-02-19T22:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=d3387380f71da35666f5d0fe9e35db7af95faf5d'/>
<id>d3387380f71da35666f5d0fe9e35db7af95faf5d</id>
<content type='text'>
Silence narrowing warnings by manually casting to a smaller type,
convert static_asserts to CHECKs, and switch from using MSG_CMSG_CLOEXEC
to manually setting FD_CLOEXEC.

Test: mma
Change-Id: I8aa02804179d754de860279fe34773800b937ab6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Silence narrowing warnings by manually casting to a smaller type,
convert static_asserts to CHECKs, and switch from using MSG_CMSG_CLOEXEC
to manually setting FD_CLOEXEC.

Test: mma
Change-Id: I8aa02804179d754de860279fe34773800b937ab6
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix darwin build break.</title>
<updated>2019-02-19T21:17:23+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-02-19T21:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=b57dc7a6701d1a90033befb2b8ec5af95365cbc1'/>
<id>b57dc7a6701d1a90033befb2b8ec5af95365cbc1</id>
<content type='text'>
The &lt;malloc.h&gt; include was vestigial from a previous revision.

Test: mma on linux
Change-Id: Iaf8351bec23c2792cefca0e5c9bd42664488f5c4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The &lt;malloc.h&gt; include was vestigial from a previous revision.

Test: mma on linux
Change-Id: Iaf8351bec23c2792cefca0e5c9bd42664488f5c4
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge changes from topic "base_cmsg"</title>
<updated>2019-02-19T20:53:01+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-02-19T20:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=8954d0bc9876b6fbe15f480ad0eae359f317a076'/>
<id>8954d0bc9876b6fbe15f480ad0eae359f317a076</id>
<content type='text'>
* changes:
  adb: switch to base::{Send,Receive}FileDescriptors.
  debuggerd: switch to base::{Send,Receive}FileDescriptors.
  base: add helpers for sending/receiving file descriptors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* changes:
  adb: switch to base::{Send,Receive}FileDescriptors.
  debuggerd: switch to base::{Send,Receive}FileDescriptors.
  base: add helpers for sending/receiving file descriptors.
</pre>
</div>
</content>
</entry>
</feed>
