No description
Find a file
Hans Boehm e263e6c633 Fix memory order and race bugs in Refbase.h & RefBase.cpp
Convert to use std::atomic directly.

Consistently use relaxed ordering for increments, release ordering
for decrements, and an added acquire fence when the count goes to
zero.

Fix what looks like another race in attemptIncStrong:
It seems entirely possible that the final adjustment for
INITIAL_STRONG_VALUE would see e.g. INITIAL_STRONG_VALUE + 1,
since we could be running in the middle of another initial
increment.

Attempt to somewhat document what this actually does, and
what's expected from the client. Hide the documentation in
the .cpp file for now.

Remove a confusing redundant test in decWeak. OBJECT_LIFETIME_STRONG
and OBJECT_LIFETIME_WEAK are the only options, in spite of some
of the original comments.

It's conceivable that either of these issues has resulted in
actual crashes, though I would guess the probability is small.
It's hard enough to reason about this code without the bugs.

Bug: 28705989
Change-Id: I4107a56c3fc0fdb7ee17fc8a8f0dd7fb128af9d8
2016-05-17 16:11:11 -07:00
adb Fix google-explicit-constructor warnings. 2016-04-29 15:44:04 -07:00
adf Adf: Remove unused variable 2015-07-27 22:08:16 -07:00
base Don't include android-base/macros.h from android-base/unique_fd.h 2016-04-19 14:45:48 -07:00
bootstat Don't hardcode gtest paths. 2016-04-26 13:28:23 -07:00
cpio fs_config: replace getenv('OUT') by new fs_config parameter 2015-07-09 21:47:07 -07:00
crash_reporter crash_reporter: Mark the euid parameter as __unused. 2016-02-26 15:44:46 -08:00
debuggerd Set groups before dropping privileges. 2016-05-05 15:47:16 -07:00
fastboot Merge "Fix google-explicit-constructor warnings." 2016-04-30 05:10:05 +00:00
fingerprintd Fix google-explicit-constructor warnings. 2016-04-29 15:44:04 -07:00
fs_mgr Merge "Add nofail fstab option" 2016-04-14 00:12:44 +00:00
gatekeeperd Fix google-explicit-constructor warnings. 2016-04-29 15:44:04 -07:00
healthd Export libbinder headers from libhealhd.default 2016-04-18 09:33:53 -07:00
include Fix memory order and race bugs in Refbase.h & RefBase.cpp 2016-05-17 16:11:11 -07:00
init Merge "Fix google-explicit-constructor warnings." 2016-04-30 05:10:05 +00:00
libbacktrace Fix google-explicit-constructor warnings. 2016-04-29 15:44:04 -07:00
libbinderwrapper binderwrapper: Resolve ambiguous base::Closure reference 2016-04-12 13:19:29 -07:00
libcrypto_utils Fix include-what-you-use problem in android-pubkey.c. 2016-04-15 17:44:05 -04:00
libcutils <cutils/atomic.h> has been inlined for two years now. 2016-05-09 15:11:56 -07:00
libdiskconfig Move libdiskconfig headers into libdiskconfig. 2016-02-13 12:48:23 -08:00
libion Use unique_ptr to free objects when ASSERT* fail. 2016-03-04 11:30:50 -08:00
liblog Return correct length from pmsgRead() 2016-05-05 16:50:44 +01:00
libmemtrack Remove unnecessary #include from <memtrack/memtrack.h>. 2016-02-16 10:32:30 -08:00
libmemunreachable Merge "Fix google-explicit-constructor warnings." 2016-04-30 05:10:05 +00:00
libnativebridge Add Mips64 Runtime ISA type. 2016-02-08 14:02:47 -08:00
libnativeloader nativeloader: Fix the case of search_path == null 2016-05-09 10:55:50 -07:00
libnetutils Set IFA_BROADCAST during IPv4 RTM_NEWADDRs 2016-03-30 20:06:36 +09:00
libpackagelistparser Remove two bogus libutils dependencies. 2016-02-17 11:54:47 -08:00
libpixelflinger Fix google-explicit-constructor warnings. 2016-04-25 15:28:36 -07:00
libprocessgroup Remove useless #include. 2016-04-30 09:10:07 -07:00
libsparse Fix static analyzer issues caught by clang 2016-02-01 11:19:26 -08:00
libsuspend Adds a parameter to the wakeup_callback to report sucessful wakeup or suspend aborts. 2015-06-25 13:15:22 -07:00
libsync Cleanup uses of sprintf so we can deprecate it. 2016-03-07 18:40:40 -08:00
libsysutils Clean up CLOEXEC in SocketListener. 2016-02-19 18:14:22 -08:00
libusbhost
libutils Fix memory order and race bugs in Refbase.h & RefBase.cpp 2016-05-17 16:11:11 -07:00
libziparchive Fix google-explicit-constructor warnings. 2016-04-25 14:57:11 -07:00
lmkd more O_CLOEXEC 2015-12-18 20:57:25 -08:00
logcat logcat: confirm -g result after -c 2016-04-29 11:33:26 -07:00
logd Fix google-explicit-constructor warnings. 2016-04-25 13:49:46 -07:00
logwrapper Don't go busy loop when waiting child process. 2016-02-16 10:13:48 -08:00
metricsd metricsd: Remove release/aquire semantic from scoped_ptr/unique_ptr 2016-04-08 09:59:05 -07:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 16:06:37 -07:00
reboot
rootdir Move list of public libraries to a config file 2016-03-17 10:54:19 -07:00
run-as Fix the run-as environment to better match su. 2015-11-03 14:31:46 -08:00
sdcard enable integer sanitizer for sdcard service 2016-05-05 16:03:32 -04:00
toolbox Lose ps to toybox. 2016-05-04 15:20:02 -07:00
trusty trusty: storage: implement storage proxy daemon 2016-05-02 15:12:01 -07:00
tzdatacheck Track rename of base/ to android-base/. 2015-12-04 22:00:26 -08:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.mk
CleanSpec.mk trusty: add gatekeeper module 2016-05-02 15:12:01 -07:00
MODULE_LICENSE_APACHE2
NOTICE