No description
Find a file
Hans Boehm 54828dc739 Fix SharedBuffer. Remove aref.
Add comment that SharedBuffer is deprecated.

Both aref and SharedBuffer had memory ordering bugs.  Aref has no
clients.

SharedBuffer had several bugs, which are fixed here:

mRefs was declared neither volatile, not atomic, allowing the
compiler to, for example, reuse a stale previously loaded value.

It used the default android_atomic release memory ordering, which
is insufficient for reference count decrements.

It used an ordinary memory read in onlyOwner() to check whether
an object is safe to deallocate, without any attempt to ensure
memory ordering.

Comments claimed that SharedBuffer was exactly 16 bytes, but
this was neither checked, nor correct on 64-bit platforms.

This turns mRef into a std::atomic and removes the android_atomic
dependency.

Bug: 28826227
Change-Id: I39fa0b4f70ac0471b14ad274806fc4e0c0802e78
(cherry picked from commit 3e4c076ef2)
2016-05-23 15:19:53 -07:00
adb adb: use asocket's close function when closing. 2016-05-18 17:20:30 -07:00
adf Adf: Remove unused variable 2015-07-27 22:08:16 -07:00
base Merge "base: Avoid compilation error when compiled with -Wdangling-else." into nyc-dev 2016-03-30 19:29:11 +00:00
bootstat bootstat: Differentiate system update boot times. 2016-04-11 10:17:46 -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_tests: Compile only on 'eng' builds. 2016-02-04 13:56:25 -08:00
debuggerd Merge "Set groups before dropping privileges." into nyc-dev 2016-05-05 21:49:43 +00:00
fastboot DO NOT MERGE ANYWHERE Remove the USB vendor id whitelist from fastboot. 2016-05-03 10:14:02 -07:00
fingerprintd Fingerprint: Plumb enumerate support. 2015-12-04 10:07:55 -08:00
fs_mgr If we fail to format a blank partition, try recovery 2016-05-03 10:01:03 -07:00
gatekeeperd Move gatekeeperd to system-background cpuset. 2016-04-15 14:29:40 +02:00
healthd healthd: Check if battery device exists instead of charger drivers before setting fake properties. am: 9cb3d3ccf4 2016-05-17 18:23:04 +00:00
include Fix SharedBuffer. Remove aref. 2016-05-23 15:19:53 -07:00
init Wipe device on policy error 2016-05-10 11:04:39 -07:00
libbacktrace libbacktrace: only build libbacktrace_offline static library. 2016-04-14 14:37:37 -07:00
libbinderwrapper libbinderwrapper: Add BinderWrapper::GetOrCreateInstance() 2016-01-04 12:56:27 -08:00
libcutils atrace: read package names from multiple sysprops 2016-04-29 10:56:41 -07:00
libdiskconfig am eb075e28: am c8179498: am 2f62edf7: Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:19:27 +00:00
libion am 8d2cd035: am 2ddb9cb1: am ed43be39: Merge "Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it\'s not needed." 2015-04-02 22:07:16 +00:00
liblog Return correct length from pmsgRead() 2016-05-09 16:53:30 +00:00
libmemtrack Remove a hack for getting libpagerank's headers. 2015-09-22 22:35:30 -07:00
libmemunreachable Silently ignore duplicate heap entries 2016-04-28 16:20:40 -07:00
libmincrypt Enable clang compilation. 2015-05-15 16:13:19 -07:00
libnativebridge Revert "nativebrige: log code_cache access errors to stderr as well" 2016-01-27 17:53:20 +00:00
libnativeloader Set parent namespace for linker-namespaces 2016-05-17 15:58:56 -07:00
libnetutils Remove a dead header (<netutils/dhcp.h>). 2016-05-18 14:22:15 -07:00
libpackagelistparser packagelistparser: rename to libpackagelistparser 2015-11-05 12:12:38 -08:00
libpixelflinger Use dlmalloc from external/dlmalloc instead of bionic/. 2016-01-22 11:04:35 -08:00
libprocessgroup Don't use mem cgroups for pid accounting. 2016-03-18 15:35:48 +01: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 Fix isValid() condition for libsync tests 2015-11-05 10:07:53 -08:00
libsysutils Tolerate RTM_DELADDR messages from deleted interfaces. 2016-02-16 23:12:26 +09:00
libusbhost libusbhost: add usb_device_reset 2016-01-13 16:01:42 -08:00
libutils Fix SharedBuffer. Remove aref. 2016-05-23 15:19:53 -07:00
libziparchive libziparchive: ensure ReadAtOffset is atomic 2016-03-09 17:17:19 -08:00
lmkd lmkd: subscribe to low mempressure events. 2016-02-09 11:25:18 +01:00
logcat logcat: apct test failures 2016-04-15 16:38:42 +00:00
logd logd: check return values 2016-03-02 11:37:21 -08:00
logwrapper am eaf04aa0: am 3b94cef1: Merge "Add FORK_EXECVP_OPTION_CAPTURE_OUTPUT to logwrap.h" 2015-08-22 02:40:51 +00:00
metricsd Merge "metricsd: Create a brillo::MessageLoop." 2016-02-04 23:38:54 +00:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 18:27:13 -07:00
reboot reboot: Turn on -Werror 2014-05-21 12:58:38 -07:00
rootdir Merge "Don't start defaultcrypto twice" into nyc-dev 2016-04-19 14:44:26 +00:00
run-as run-as should accept /data/user/0 symlink 2016-03-21 07:56:46 -06:00
sdcard Add support for FUSE_CANONICAL_PATH 2016-04-25 20:42:57 -07:00
toolbox Allow building with Python 3.x 2016-03-08 08:18:34 -08:00
trusty [core][trusty] add gatekeeper module 2015-11-12 12:19:48 -08: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 Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk Add a CleanSpec for grep/toolbox. 2015-03-22 18:04:54 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00