<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/libmemunreachable, 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>Make memunreachable_test more robust against false negative leaks</title>
<updated>2018-05-15T05:17:44+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2018-05-14T21:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=05dca7ae962b2c9f7b038cea21cf318468a18404'/>
<id>05dca7ae962b2c9f7b038cea21cf318468a18404</id>
<content type='text'>
For some reason, the memunreachable tests are rock solid on the
devices covered by APCT, but catch a ton of false-negatives on
hikey960, which show up as failures that look like:
system/core/libmemunreachable/tests/MemUnreachable_test.cpp:200: Failure
Expected equality of these values:
  1U
    Which is: 1
  info.leaks.size()
    Which is: 0

These happen when a stray copy of a pointer is lying around that
points to the memory it is expected to leak.  The stray pointers
can be on the stack or in the jemalloc thread cache of freed
allocations, which is always considered active memory.

Add some extra cleanups to get rid of old pointers.
1.  Clear the tcache when destructing UnreachableMemoryInfo
2.  Clear the stack and tcache before and after each test
3.  Make MemunreachbleTest.twice match MemunreachableTest.stack

Also fix MemunreachableTest.notdumpable, which was only passing
when run as root, which was bypassing what the test was trying
to cover.  Make the test pass when run as non-root, and skip
when the test is running as root.

Bug: 79701104
Test: memunreachable_test
Test: memunreachable_test as root
Change-Id: Ia6c6df11e76405d08118afcc19c1fe80a6684c56
Merged-In: Ia6c6df11e76405d08118afcc19c1fe80a6684c56
(cherry picked from commit ca71f170b78e4707dbaa5bf4ddace47a455b4699)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For some reason, the memunreachable tests are rock solid on the
devices covered by APCT, but catch a ton of false-negatives on
hikey960, which show up as failures that look like:
system/core/libmemunreachable/tests/MemUnreachable_test.cpp:200: Failure
Expected equality of these values:
  1U
    Which is: 1
  info.leaks.size()
    Which is: 0

These happen when a stray copy of a pointer is lying around that
points to the memory it is expected to leak.  The stray pointers
can be on the stack or in the jemalloc thread cache of freed
allocations, which is always considered active memory.

Add some extra cleanups to get rid of old pointers.
1.  Clear the tcache when destructing UnreachableMemoryInfo
2.  Clear the stack and tcache before and after each test
3.  Make MemunreachbleTest.twice match MemunreachableTest.stack

Also fix MemunreachableTest.notdumpable, which was only passing
when run as root, which was bypassing what the test was trying
to cover.  Make the test pass when run as non-root, and skip
when the test is running as root.

Bug: 79701104
Test: memunreachable_test
Test: memunreachable_test as root
Change-Id: Ia6c6df11e76405d08118afcc19c1fe80a6684c56
Merged-In: Ia6c6df11e76405d08118afcc19c1fe80a6684c56
(cherry picked from commit ca71f170b78e4707dbaa5bf4ddace47a455b4699)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove test_suites: ["vts"] from memunreachable_binder_test</title>
<updated>2018-04-18T23:35:05+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2018-03-15T21:22:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=2f569b75a4a90641965e8427445553df5f6abd7f'/>
<id>2f569b75a4a90641965e8427445553df5f6abd7f</id>
<content type='text'>
memunreachable_binder_test is pulled in by
test/vts/tools/build/tasks/list/vts_test_bin_package_list.mk, it
doesn't need to be listed in test_suites.

Fixes warnings:
build/make/core/base_rules.mk:620: warning: overriding commands for target `out/host/linux-x86/vts/android-vts/testcases/memunreachable_binder_test'
build/make/core/base_rules.mk:620: warning: ignoring old commands for target `out/host/linux-x86/vts/android-vts/testcases/memunreachable_binder_test'

Bug: 78229249
Test: vts-tradefed run commandAndExit vts -m VtsKernelBinderTest
Change-Id: Ifd282b2f5bb652295fa34ad247919eb85ea7abc8
Merged-In: Ifd282b2f5bb652295fa34ad247919eb85ea7abc8
(cherry picked from commit f013b621520bbfaaeb165ddd430accbe3fe66df2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
memunreachable_binder_test is pulled in by
test/vts/tools/build/tasks/list/vts_test_bin_package_list.mk, it
doesn't need to be listed in test_suites.

Fixes warnings:
build/make/core/base_rules.mk:620: warning: overriding commands for target `out/host/linux-x86/vts/android-vts/testcases/memunreachable_binder_test'
build/make/core/base_rules.mk:620: warning: ignoring old commands for target `out/host/linux-x86/vts/android-vts/testcases/memunreachable_binder_test'

Bug: 78229249
Test: vts-tradefed run commandAndExit vts -m VtsKernelBinderTest
Change-Id: Ifd282b2f5bb652295fa34ad247919eb85ea7abc8
Merged-In: Ifd282b2f5bb652295fa34ad247919eb85ea7abc8
(cherry picked from commit f013b621520bbfaaeb165ddd430accbe3fe66df2)
</pre>
</div>
</content>
</entry>
<entry>
<title>Make memunreachable_binder_test suitable for VTS</title>
<updated>2018-02-28T02:29:18+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2018-02-28T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=51e6c252c495234fc4acc256d65fcb04888357a2'/>
<id>51e6c252c495234fc4acc256d65fcb04888357a2</id>
<content type='text'>
Link statically against libmemunreachable to avoid runtime
dependency on libmemunreachable.so.
Provide a better error when run as non-root.
Rename the test to MemunreachableBinderTest.
Add comments explaining the test sequence.

Bug: 28275695
Test: memunreachable_binder_test
Change-Id: Iddfba636205b7ca3ad31a6ba2c4e85abadd32d0d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Link statically against libmemunreachable to avoid runtime
dependency on libmemunreachable.so.
Provide a better error when run as non-root.
Rename the test to MemunreachableBinderTest.
Add comments explaining the test sequence.

Bug: 28275695
Test: memunreachable_binder_test
Change-Id: Iddfba636205b7ca3ad31a6ba2c4e85abadd32d0d
</pre>
</div>
</content>
</entry>
<entry>
<title>bpfmt.</title>
<updated>2018-02-17T01:58:14+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2018-02-17T01:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=dc699a269f6a22af6cbba0f6e1359fde103dc4d3'/>
<id>dc699a269f6a22af6cbba0f6e1359fde103dc4d3</id>
<content type='text'>
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
</pre>
</div>
</content>
</entry>
<entry>
<title>Add explanation for clone use</title>
<updated>2018-02-08T23:07:47+00:00</updated>
<author>
<name>Daniel Colascione</name>
<email>dancol@google.com</email>
</author>
<published>2018-02-08T23:06:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=b650aef2a031fbb6cc2a7bef832fa60eb355f9a1'/>
<id>b650aef2a031fbb6cc2a7bef832fa60eb355f9a1</id>
<content type='text'>
Test: no code changes
Change-Id: I70c8af8261cda3163677557fd78ae0119b1f1be0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: no code changes
Change-Id: I70c8af8261cda3163677557fd78ae0119b1f1be0
</pre>
</div>
</content>
</entry>
<entry>
<title>Add OWNERS.</title>
<updated>2017-12-07T21:30:03+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2017-12-07T19:31:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=693d63f9cfc21e3334c6f8f228d73c4fb60ced8b'/>
<id>693d63f9cfc21e3334c6f8f228d73c4fb60ced8b</id>
<content type='text'>
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
</pre>
</div>
</content>
</entry>
<entry>
<title>Silence static analyzer warnings about memory leaks</title>
<updated>2017-09-24T20:36:29+00:00</updated>
<author>
<name>George Burgess IV</name>
<email>gbiv@google.com</email>
</author>
<published>2017-09-24T20:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=80136a1e4142d66846cf9024ac83346a9444cdca'/>
<id>80136a1e4142d66846cf9024ac83346a9444cdca</id>
<content type='text'>
The static analyzer complains that this memory is leaked regardless of
how I try to work around it (unless we escape the memory by using a
global or something, but...). Basically, as long as there's some sort
of operation on the reinterpret_cast'ed pointer, it complains. If we
remove the bitwise negations, it doesn't. Doing so would presumably
defeat the purpose of this test, though, so add a NOLINT.

Bug: 27101951
Test: mma. No more static analyzer warning for this file.
Change-Id: If9008946a2145d17b8651535141bfd7ec9224739
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static analyzer complains that this memory is leaked regardless of
how I try to work around it (unless we escape the memory by using a
global or something, but...). Basically, as long as there's some sort
of operation on the reinterpret_cast'ed pointer, it complains. If we
remove the bitwise negations, it doesn't. Doing so would presumably
defeat the purpose of this test, though, so add a NOLINT.

Bug: 27101951
Test: mma. No more static analyzer warning for this file.
Change-Id: If9008946a2145d17b8651535141bfd7ec9224739
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix static analyzer warnings</title>
<updated>2017-09-13T00:01:20+00:00</updated>
<author>
<name>George Burgess IV</name>
<email>gbiv@google.com</email>
</author>
<published>2017-09-12T23:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=180e5e7021d17176bf2f5f110970e58cb19d6310'/>
<id>180e5e7021d17176bf2f5f110970e58cb19d6310</id>
<content type='text'>
The static analyzer was complaining that we were potentially leaking
memory here (in `ASSERT_NE(ptr, nullptr)` after `new (char)`). This
wasn't correct, but it's also not possible for `new` to return nullptr
without std::nothrow.

In any case, swap to direct calls to `::operator new`, since it looks
like this test explicitly wants calls to `::operator new` to be emitted
(which the C++ standard doesn't guarantee for all `new` expressions).

Bug: 27101951
Test: mma; static analyzer warnings are gone. Also ran
memunreachable_test on marlin; no failures.
Change-Id: Ia740e41079f263040da978ba1ccc71c9c39f53fd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static analyzer was complaining that we were potentially leaking
memory here (in `ASSERT_NE(ptr, nullptr)` after `new (char)`). This
wasn't correct, but it's also not possible for `new` to return nullptr
without std::nothrow.

In any case, swap to direct calls to `::operator new`, since it looks
like this test explicitly wants calls to `::operator new` to be emitted
(which the C++ standard doesn't guarantee for all `new` expressions).

Bug: 27101951
Test: mma; static analyzer warnings are gone. Also ran
memunreachable_test on marlin; no failures.
Change-Id: Ia740e41079f263040da978ba1ccc71c9c39f53fd
</pre>
</div>
</content>
</entry>
<entry>
<title>Define current ABI string in android-base/macros.h</title>
<updated>2017-08-23T18:46:38+00:00</updated>
<author>
<name>dimitry</name>
<email>dimitry@google.com</email>
</author>
<published>2017-08-23T08:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=b6ba817de4b80ec2430383899b051e86dd2bec27'/>
<id>b6ba817de4b80ec2430383899b051e86dd2bec27</id>
<content type='text'>
Test: make
Change-Id: I8200d7b3232edba43a583c5ff1e1b0f78c768f69
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: make
Change-Id: I8200d7b3232edba43a583c5ff1e1b0f78c768f69
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove LOCAL_CLANG and clang: true</title>
<updated>2017-07-25T12:29:50+00:00</updated>
<author>
<name>Lennart Wieboldt</name>
<email>lennart.1997@gmx.de</email>
</author>
<published>2017-07-24T17:32:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=cd15fc7ba80b31539e85792ec35d7ebe0c8ff764'/>
<id>cd15fc7ba80b31539e85792ec35d7ebe0c8ff764</id>
<content type='text'>
clang is the default compiler since Android nougat

Test: mma &amp; verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt &lt;lennart.1997@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
clang is the default compiler since Android nougat

Test: mma &amp; verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt &lt;lennart.1997@gmx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
