Open
Conversation
Int64 overflow during instruction selection caused incorrect code patterns to emitted in some cases of long operations with an immediate value of 0x8000000000000000. The code in question was attempting to determine if the immediate operand would fit in aarch64 immediate instruction variants. Internal b/17630605 Change-Id: I8177021b73e51302bc1032387d83b1dd567ed6db
It is dangerous to call dlsym from within a signal context since it takes a lock and can lead to a mutex reentry attempt if timing is bad. This change adds an initialization function to the signal chain that calls dlsym for sigaction and sigprocmask from outside the signal context (from Runtime::Init()). The results are cached in a static variable and used from within the signal context if necessary. However, tests don't necessarily call Runtime::Init() so we also need to deal with the case where the signal chain is not initialized and perform a lazy initialization from inside sigaction or sigprocmask. This is always outside a signal context since we have not initialized the runtime. Bug: 17498571, 17896006 (cherry picked from commit cefcea8) Change-Id: I9bf8540a1250eadf977ff9af249dbe1c73b5ac63
Although switch data is generally placed at the end of a dex file by dx, it can occur elsewhere (and does via obsfucators). This CL fixes a parsing error related to embedded switch data by ensuring valid dex instructions following the embedded data appear in their own basic blocks. b/18524584 Change-Id: I815bb5ec939803f706f98beb3afbefc8b527f730
ART performs some dex optimizations during recompilation, especially when parameter --compiler-filter=interpret-only is used. Therefore, the memory has to be writable, otherwise dex2oat crashes with access errors. The underlying input file doesn't need to be writable, any modifications are just done in the memory.
Verifier failure message is corrupted. The verification failure reason overlaps verification failure location. MethodVerifier::Fail() method creates failure message stream by std::ostringstream(failure location) constructor which by default sets the stream's position indicator to the begging of that stream. Inserting failure reason to the stream by "<<" then overrides the failure location. Using std::ostringstream(failure location, std::ostringstream::ate) fixes the issue by setting the stream's position indicator to the end of the stream on opening. Signed-off-by: Elena Sayapina <elena.v.sayapina@intel.com> (cherry picked from commit 78480ec) bug: 17790245 Change-Id: I31955e859a4eb01d05318395901e8cd229a6c33c
Changes hard aborts to hard verifier failures, which rejects a class instead of killing the process. Bug: 17625962 Change-Id: Iba8e15676e13ea6dcd6e1e5d0484031d9ab52ae9
It was possible to generate a hard failure and a subsequent soft failure, which violates a CHECKed invariant. Refactor code slightly to share common code. Bug: 17625962 Change-Id: Iccd9e30f1087363b19b2faedc10243a2290202c0
…::IsStatic semantics. Bug: 18485243 (cherry picked from commit be6fa5e) Change-Id: I6e4d8e7587f7e03288ce039471154c1e6ebc7d8a
In rare cases, the target method for invoke-virtual-quick cannot be resolved because the "this" reference is still NULL when certain code paths are followed. ART's method verifier doesn't seem to be able to detect that previous checks ensure that the statement is never reached without an object reference. It marks the method (and therefore the class) as invalid/rejected and therefore makes the complete class unusable at runtime. So far, this was only detected in class initializers, which aren't compiled anyway. The interpreter later checks for this != NULL and throws an exception in this case, so it's safe to ignore this error situation. Fixes rovo89/Xposed#42.
…xposed-lollipop Conflicts: dex2oat/dex2oat.cc runtime/verifier/method_verifier.cc
LG has encrypted a few apps with their DRM implementation. Those apps can usually not be loaded. Fortunately, the decryption takes place in a separate library called liblgalmond.so. Xposed now uses this library if available to check if a dex file (usually located in a ZIP archive) is encrypted, and if yes, triggers the in-place decryption of the file before initializing it. Fixes rovo89/Xposed#27.
…xposed-lollipop Conflicts: runtime/dex_file.cc runtime/dex_file.h
dex2oat decides the number of compiler threads to be spawned based on the number of cores in the system. Using this max possible compiler threads causes over parallelization on some platforms and there by leads to longer install times. Reducing to fewer threads on these platforms, improves this time by 60% to 100%. Some APPs will call dex2oat at the first launch time(runtime). The thread count tuning is needed for such scenario. Change-Id: Id3a545f0300f93397627beeb697a7b7cfd912d52
This reverts commit 31df113. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Conflicts: runtime/dex_file.cc runtime/dex_file.h
This reverts commit 31df113.
LG has encrypted a few apps with their DRM implementation. Those apps can usually not be loaded. Fortunately, the decryption takes place in a separate library called liblgalmond.so. Xposed now uses this library if available to check if a dex file (usually located in a ZIP archive) is encrypted, and if yes, triggers the in-place decryption of the file before initializing it. For precompiled/odex files, a different way of decrypting is required. Similar to dex files, the decryption can also be done on the fly when the file is loaded. Fixes rovo89/Xposed#27.
…xposed-lollipop Conflicts: runtime/dex_file.h
This reverts commit cf4003c. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
The value may not contain a valid jobject, so ignore and use null directly. Refactor a bit to have one common function for both synchronized and non-synchronized case. Add a test to the JNI compiler tests. Bug: 18135031 Change-Id: If2f004a112f36f4ff68172a946dec67ce561ae4d Conflicts: compiler/jni/jni_compiler_test.cc
Xposed modifies the size of TypedArray objects to match those of XTypedArray objects in order to change the class of created objects later. This leads to issues when other apps create their own subclass of TypedArray with additional fields. When compiling the app, the compiler doesn't know that the TypedArray object will be a few bytes bigger, so the offsets of the additional fields differ between runtime and compile time. If the compiler optimizes the access to these fields by addressing them via their offsets, it will lead to crashes. Therefore, we can't allow this kind of optimization for subclasses of TypedArray. Fixes rovo89/Xposed#54.
…lollipop-5.1 Conflicts: runtime/dex_file.cc runtime/runtime.cc
1800 is still in safety threshold. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
This reverts commit ed551ed. Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
This reverts commit e16ffe92bf73907a377f0fc7049a715732d50df8.
to support String.clear()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.