This will allow us to conditionally change the compiler-filter based on other properties.
Bug: 15165413
Change-Id: I1676987c69a3cad4217dc4b56465ef3ae886122a
Symptom: SkBitmap::getAddr(int, int) may return NULL due to unrecognized config
(ex: kRLE_Index8_Config). This will cause memcmp method to crash. Since bm0 and
bm1 both have pixel data() (have passed NULL == getPixels() check), those 2
bitmaps should be valid (only unrecognized), we return JNI_FALSE to warn user
those 2 unrecognized config bitmaps may be different.
Change-Id: I6970c27de412110a3035d0a783112c4cd3ebc35b
AudioTrack and AudioRecord JNI should not cast
jshortArray to jbyteArray. This appeared to work with Dalvik
but causes data corruption with ART.
(cherry picked from commit 9d02848e902d04417df616354db3a18c03e639b7)
Change-Id: Ie36624d3ea06042373c64edced4b5e30b7b1ee86
Locale settings are persisted to system properties
and not to system settings, so the values read here
are used pretty much everywhere.
bug: 15873165
bug: 10090157
Change-Id: Ie7cda166439112c615afbd38253cf4fbb5791242
64-bit process will have virtual addresses that don't fit in an
unsigned long if ActivityManagerService is in a 32-bit process,
and the locations of the '-' and ' ' characters in the maps
are not predictable. Fix the sscanf for finding the start of the
mapping, and use it again to find the end of the mapping. Also
fix a few 64-bit warnings.
Change-Id: I8855c76085142768be1d45346f1032fd37cbe4eb
The presence of ".bc" files in an APK implies
incompatibility with any of the 64 bit ABIs.
bug: 14900093
Change-Id: I66ca339a9a149cb3b7e7b349033d80acdeb4140a
The function android_media_AudioSystem_error_callback from AudioSystem
JNI interface is using FindClass function but does not delete the
reference created by VM in this function.
By doing this call, VM will add a local reference in IndirectRefTable
and it's the caller's job to delete this reference.
By not doing this, everytime this callback is called, a new reference is
added and never deleted.
The effect is crashing the VM running system_server:
E/dalvikvm( 3071): JNI ERROR (app bug): local reference table overflow (max=512)
W/dalvikvm( 3071): JNI local reference table (0x732da288) dump:
W/dalvikvm( 3071): Last 10 entries (of 512):
W/dalvikvm( 3071): 511: 0x42a90008 java.lang.Class<android.os.Parcel>
W/dalvikvm( 3071): 510: 0x4381fd90 android.view.KeyEvent
W/dalvikvm( 3071): 509: 0x439b9808 android.view.KeyEvent
W/dalvikvm( 3071): 508: 0x42d2fe18 java.lang.Class<com.android.server.input.InputManagerService>
W/dalvikvm( 3071): 507: 0x42ad4298 java.lang.Class<android.media.AudioSystem>
W/dalvikvm( 3071): 506: 0x42ad4298 java.lang.Class<android.media.AudioSystem>
W/dalvikvm( 3071): 505: 0x42ad4298 java.lang.Class<android.media.AudioSystem>
W/dalvikvm( 3071): 504: 0x42ad4298 java.lang.Class<android.media.AudioSystem>
W/dalvikvm( 3071): 503: 0x42ad4298 java.lang.Class<android.media.AudioSystem>
W/dalvikvm( 3071): 502: 0x42ad4298 java.lang.Class<android.media.AudioSystem>
W/dalvikvm( 3071): Summary:
W/dalvikvm( 3071): 510 of java.lang.Class (3 unique instances)
W/dalvikvm( 3071): 2 of android.view.KeyEvent (2 unique instances)
E/dalvikvm( 3071): Failed adding to JNI local ref table (has 512 entries)
...
E/dalvikvm( 3071): VM aborting
In this case, PID 3071 is system server.
Change-Id: I0c113eb72256984854d59a3ccef11a8d23f96e79
Signed-off-by: Robert Chiras <robert.chiras@intel.com>
- Differentiate between clean exits and signals.
- Change the logic for the waitpid warning. We should log it
only if the *first* call to waitpid returned ECHILD.
Change-Id: I6bc50e4ffd100fb7f3f526d6b4056bed10b8045f
- critical issue with using %lld to scanf into a jlong
- subsidiary issues with mix jint, jsize and jlong printing
Change-Id: I77c6b3d3a202fec741cacc540fc39ad6cba25f52
We now use a two step approach :
- First we look through the list of shared libraries in an
APK, and choose an ABI based on the (priority) list of ABIs
a given device supports.
- Then we look through the list of shared libraries and copy
all shared libraries that match the ABI we've selected.
This fixes a long-standing bug where we would sometimes copy
a mixture of different ABIs to the device, and also allows us
to clearly pick an ABI to run an app with.
The code in NativeLibraryHelper has been refactored so that all
file name validation & matching logic is done in a single place
(NativeLibrariesIterator). This allows us to avoid a lot of
redundant logic and straightens out a few corner cases (for eg.
where the abi determination & copying logic do not agree on
what files to skip).
bug: https://code.google.com/p/android/issues/detail?id=65053
bug: 13647418
Change-Id: I34d08353f24115b0f6b800a7eda3ac427fa25fef
Co-Authored-By: Zhenghua Wang <zhenghua.wang0923@gmail.com>
Co-Authored-By: Ramin Zaghi <ramin.zaghi@arm.com>
Co-Authored-By: Narayan Kamath <narayan@google.com>
- Make copies of argc, argv before argv is potentially
overwritten with the process name.
- Allow multiple command line arguments to be passed to
ZygoteInit (this is required for some of the 64 bit
zygote work).
- Add an explanatory comment about how these argments
are processed.
Change-Id: I752be69c5c0f97ed17d1a3dded19f46ee00929b0
These look like historical oddities, and weren't really being
used for anything useful.
Process:setArgV0 was being called by android.util.Process, but
that functionality can be moved directly into the implementation
of that class.
bug: 13647418
Change-Id: I216c8f8a4c065f0cf3a61f19f9e32decd26f93f6
The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.
The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
logging.
- We call env->FatalError() instead of using LOG(FATAL)
Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
Changes in this patch include
[x] Use %zu for size_t, %zd for ssize_t
[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)
Change-Id: Id1aaa7894a7d0b85ac7ecd7b2bfd8cc40374261f
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>