| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
into replicant-6.0
|
| |\
| | |
| | |
| | |
| | |
| | | |
Android 6.0.1 release 66
Change-Id: I5ccc6e68283e30b8d0419eb7512c7183e58ec5ed
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.
Correcting the length computation and adding bound checks to the
conversion functions.
Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e46d2e1074d1a365e232af0dcedd6a1)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If n > 2 threads all lock the mutex awaiting the clock method to
be set, the 1st thread will first set the method and unlock. The
2nd thread will then take the mutex, but never unlock because the
clock_method has already been updated by the 1st thread. This causes
a deadlock for threads 3-n.
Solution is to ensure the calling thread always unlocks the mutex if
it has previously locked it.
Log:
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x733313b0 self=0xb4cf6500
| sysTid=12786 nice=0 cgrp=default sched=0/0 handle=0xb6f86b44
| state=S schedstat=( 41990410 32985836 80 ) utm=3 stm=1 core=2 HZ=100
| stack=0xbe5fb000-0xbe5fd000 stackSize=8MB
| held mutexes=
native: #00 pc 00017638 /system/lib/libc.so (syscall+28)
native: #01 pc 0003ffa5 /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tPK8timespeci+504)
native: #02 pc 000400a9 /system/lib/libc.so (pthread_mutex_lock+26)
native: #03 pc 0000fa01 /system/lib/libutils.so (_ZN7android19elapsedRealtimeNanoEv+16)
native: #04 pc 0000fb1f /system/lib/libutils.so (_ZN7android15elapsedRealtimeEv+2)
native: #05 pc 00214d1d /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_SystemClock_elapsedRealtime__+72)
"Thread-6372" prio=5 tid=9 Native
| group="main" sCount=1 dsCount=0 obj=0x32c05120 self=0xacb58100
| sysTid=12829 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0xb38c3930
| state=S schedstat=( 869427 8219115 17 ) utm=0 stm=0 core=2 HZ=100
| stack=0xb37c1000-0xb37c3000 stackSize=1038KB
| held mutexes=
native: #00 pc 00017638 /system/lib/libc.so (syscall+28)
native: #01 pc 0003ffa5 /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tPK8timespeci+504)
native: #02 pc 000400a9 /system/lib/libc.so (pthread_mutex_lock+26)
native: #03 pc 0000fa01 /system/lib/libutils.so (_ZN7android19elapsedRealtimeNanoEv+16)
native: #04 pc 0000fb1f /system/lib/libutils.so (_ZN7android15elapsedRealtimeEv+2)
native: #05 pc 00214d1d /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_SystemClock_elapsedRealtime__+72)
HAM-1470
Change-Id: I41874d2b0ea034a35a74da030398231089c15cde
|
|/ /
| |
| |
| |
| |
| |
| | |
http://elliotth.blogspot.com/2012/10/how-not-to-use-readdirr3.html
Test: boots.
Change-Id: If75532e24fe4d17743bf8e8c9590156dee378a63
|
|\ \
| |/
| |
| |
| |
| | |
Android 6.0.0 release 26
Change-Id: I93d1e3767cbacab2b18cff360065c91b9eaf1d96
|
| |\
| | |
| | |
| | | |
Change-Id: Ic46ee60de7bc500f4e1d5fe841524db80918a8d9
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: Ifd9a44777a472ae893f894391bff7ef81456d92c
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use external/safe-iop to check for overflows on arithmetic
operations.
Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.
Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.
bug: 22953624
(cherry picked from commit c609c31fb56ae434caa2d0153cd0a2f74a715071)
Change-Id: I61644633db6b54fa230683615de9724f7fabf6fb
|
| | |\ \
| | | |/
| | | |
| | | | |
Change-Id: I236367bd60046ba06669cbcdae81184f9d0a74c7
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
(cherry picked from commit 66b6eb9490beeeabc804d790c1c4060ce047afd4)
Change-Id: Ic71dd0025b9a7588c4f3bb1c7be1bd13d2ff5105
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use external/safe-iop to check for overflows on arithmetic
operations.
Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.
Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.
bug: 22953624
Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Android 6.0.0 release 5
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use external/safe-iop to check for overflows on arithmetic
operations.
Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.
Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.
bug: 22953624
Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
* Don't repeatedly try to open nonexistent devices where possible.
Change-Id: Id1f18d05943a66978d430556fa16ed761e8e464b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
(cherry picked from commit 66b6eb9490beeeabc804d790c1c4060ce047afd4)
Change-Id: I363f49b5b3c6b7b3ac08cba2c14d72c431588c5a
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'fc5fdc85683f87c42d5ce7bcee4e2b70ef0acdd0':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'e45d96d6bf592f0ae20bb021ea529acc94e0cb55':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'cd407a17fe326f3e18866ddddb1c747b06a45fc0':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
|
| | | |\
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
rIfe1dc0791040150132bea6884f1e6c8d31972d1b
* commit 'e0dce90b0de2b2b7c2baae8035f810a55526effb':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 23290056
Change-Id: If6e22b0159de6635a8ca5305895b7718f15becc7
|
| |\ \ \ \
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
fix overflow in String8::allocFromUTF8
* commit 'e97682be0634fe773f70097bc518e5d034efe8f7':
libutils: fix overflow in String8::allocFromUTF8
|
| | |\ \ \
| | | |/ /
| | | | |
| | | | |
| | | | | |
* commit '4956c0fe1e582a8497aff34a41aeb8bf4748eef0':
libutils: fix overflow in String8::allocFromUTF8
|
| | | |\ \
| | | | |/
| | | | |
| | | | |
| | | | | |
* commit '5b85b1d40d619c2064d321364f212ebfeb6ba185':
libutils: fix overflow in String8::allocFromUTF8
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
(cherry picked from commit 4eeacbeec0ae66e9d9395abbf83666709f2e11e3)
Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
(cherry picked from commit ebabef275283f771151ec93c17469374b789b2c8)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
(cherry picked from commit 4eeacbeec0ae66e9d9395abbf83666709f2e11e3)
Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Sometimes it seems like we can get into a situation where we are
unable to remove an fd from the epoll set but it keeps sending us
events anyhow. Defensively rebuild the epoll set in this case
to prevent us from spinning forever.
Bug: 21271428
Change-Id: I5607e565f2e12460d7113a1f62a70d38d334e271
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add a build id field to the header structure in blob cache. Add build
id support with reading and writing the cache. When the cache gets
written it writes the build id at the end of the header. When read it
checks to see if there is a match between the current version and the
version in the cache. If not, it invalidates the cache which would
typically only occur during an ota update. Also remove blob cache
from the host build.
bug: 18262905
Change-Id: I753b1de1986703a4c1c8691b9d2bb533b2546143
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I83a70959ed0dcab2237faaf1dddc02b5eb0363c9
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
LOCAL_ADDITIONAL_DEPENDENCIES in cases where it\'s not needed."
* commit '8d2cd03547c76f6c670b33d4fe6d44b646c14b45':
Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
|
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 19933224
Change-Id: I6611e918db960bbb0e74f8308e10bdf79510b899
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
(cherry picked from commit c007bc3856a4cf86b8f610eb045f26a9dedc2894)
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | | |
* commit '90a968f0e3fb903aad41f6689c337a7e4a8d5c7b':
Revert "Create libbase."
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Breaks internal master.
This reverts commit 98ff77204cef9bb8f0f27420833233622060a09e.
Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
|
|\ \ \ \ \
| |/ / / /
| | | | |
| | | | |
| | | | | |
* commit '517f65daef177d06d7835300a1c23ce3409c0643':
Create libbase.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Move StringPrintf and the string based file I/O from libutils to
libbase.
Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When a file descriptor is closed before removing it from the
epoll set, it will normally be removed automatically from the
epoll set by the kernel. However if there exists a duplicate
then the original file descriptor may remain in the set and
continue to receive events until all duplicates have been closed.
Unfortunately due to kernel limitations we need to rebuild the epoll
set from scratch because it may contain an old file handle that we are
now unable to remove since its file descriptor is no longer valid.
No such problem would have occurred if we were using the poll system
call instead, but that approach carries others disadvantages.
Bug: 19715279
Change-Id: If1ab8ebda0825755a416d513e888942a02ee3948
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Added code to protect against situations that may occur when a
Looper callback has the side-effect of closing the file descriptor that
it is watching before it returns. This code pattern is very
convenient for implementation but it does expose issues in how
the list of callbacks is maintained. In particular, we
need to watch out for file descriptors which have been reused.
This change may resolve previously unexplained ANRs associated with
log messages such as: "Error modifying epoll events for fd 44, errno=2"
Bug: 10349083
Change-Id: I20eedf6ffbdeda382653ca0104962505194741b0
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The loop isn't technically idle at this time, it's just checking
whether any file descriptors have pending events. However it's
still a good signal as to whether the loop is alive.
Bug: 19532373
Change-Id: I555c473e70ffd8a56e1b10aa60026eb674a16de9
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Nobody ever called acquire() so release() was always
equivalent to delete. Just use delete instead so that
people can use unique_ptr directly (or shared_ptr if
they really want refcounts).
Change-Id: I9e3ad5e0f6a4fcc4e02e5a2ff7ef9514fe234415
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The reference to NOT_USING_KLIBC appears to be the only one
in our codebase. This change also removes some cygwin specific
retry logic - all other supported platforms in this section
of the code should support mapping at an offset.
Note that i've reversed the sense of the check, we always sysconf
since that's recommended practice.
Change-Id: Ib985fb665193d7a07a282f7092cd77c0bc508a66
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The actual bug is == instead of !=, but the real cause was me trying to be
too clever. This patch switches to much simpler code, and -- since the
intended use of this code is security anyway -- adds logging if anything
goes wrong.
Bug: 19361774
Change-Id: If2af07d31a5002f9010b838247b691f6b28bdfb1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.
I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...
Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Only two days in, and I'm already really regretting putting this code
somewhere that builds for Mac OS and Windows...
Change-Id: I576ee4a9e647e10dc2d47c7e1e38aedee2bf404c
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I857a80b61768d4e9610bdd149eff2d9d8e48d2c0
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: If333c28b8ed047346a2dd85e591c4bedbab874cc
|