85a78cff8cbd6477c19ab4c9a21698dddcf0a9f9 |
|
21-Mar-2017 |
Josh Gao <jmgao@google.com> |
Revert^2: "Make sigchain actually own the signal chain."" This reverts commit 33dca562d5ed9f52f63ced2334c066333ca073e9. Bug: http://b/36205469 Bug: http://b/36262089 Original-Change-Id: I416b13de800d3e23424cf20688ccfd7e4e48a111 Change-Id: I1267be72c32ed73d1079a572d0b8907556526dde
|
33dca562d5ed9f52f63ced2334c066333ca073e9 |
|
18-Mar-2017 |
Jin Qian <jinqian@google.com> |
Revert "Make sigchain actually own the signal chain." This reverts commit 7600fa9234e02cf5108a3a82babf3d3ab82fcddd. Change-Id: Ia46db2a7df0c0ac07107a8db06f42ff1afd4a97e
|
7600fa9234e02cf5108a3a82babf3d3ab82fcddd |
|
16-Mar-2017 |
Josh Gao <jmgao@google.com> |
Make sigchain actually own the signal chain. sigchain exists to make sure that art's signal handler is at the front, but it currently does this by putting the fault manager in the actual signal handler slot and having that handler call into sigchain when it doesn't want to handle a signal. sigchain also has a "special signal handler" (used for native bridge) that runs before user handlers, but after ART's. Move maintenance of the signal chain into sigchain itself, and use the same mechanism to handle the ART handler and the native bridge handler. Also, clean up some bugs: - InvokeUserSignalHandler was using the wrapper sigprocmask instead of the actual one. - Use SIG_SETMASK instead of SIG_BLOCK between calling handlers, in case one of the handlers changes the signal mask. - Correctly handle sigaction without SA_SIGINFO. Bug: http://b/36205469 Bug: http://b/36262089 Test: NPE with dalvikvm with/without TEST_NESTED_SIGNAL defined (arm/aarch64) Change-Id: I416b13de800d3e23424cf20688ccfd7e4e48a111
|
efd20cb2f63cf647c7d947d00e8987affefeb177 |
|
01-Mar-2017 |
Josh Gao <jmgao@google.com> |
Catch signals that happen inside a fault handler. Unblock some signals (SIGABRT, SIGBUS, SIGSEGV) that could happen inside of the ART internal fault handlers, to report crashes inside of the signal handler. Because we can't use sigaction to change the handler when this happens, because it modifies global state, add a new member variable in Thread to track whether a call to the fault handler is reentrant or not. Remove the old nested signal implementation that attempted to do this. Bug: http://b/35853436 Test: changed the #if 0 to #if 1, ran a dummy process that threw a NullPointerException, inspected logcat Change-Id: I04bb4a09433c6817933d64ec681ec433b528f2a5
|
e8e1127da3f154fae8d2eb16a94203544a182159 |
|
28-Jun-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Do checks on the fault address when we think it's an NPE. bug:29321958 Change-Id: I28f4da56eb3e0b48721d3ac41114858bc80daadb
|
1376bdf1a3b16602b4ee2bfe811e79411928d8a7 |
|
18-Jan-2016 |
jgu21 <jinghui.gu@intel.com> |
Invoke all other registered handlers only for generated code To get more information for unhandled signals, the nested handler might be registered to kernel. This will expose an issue in some scenarios, for example mulit-thread case, because the art default handler will be replaced in kernel. To solve it, other handlers are only invoked for generated code. Change-Id: Ifa9cf4dfdd6a0ef18f88c2e2313b545d26ed826d Signed-off-by: jgu21 <jinghui.gu@intel.com>
|
3d21bdf8894e780d349c481e5c9e29fe1556051c |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
|
e401d146407d61eeb99f8d6176b2ac13c4df1e33 |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
|
d000480134b7b00895fbfd142f1d1e18d9cfa6e9 |
|
16-Oct-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add way to ensure we are at the front of the sigaction chain Calling this after jni_on_load fixes the unity apps. This is not exactly correct since we may already have the following chain. Start up: Us -> debuggerd After app goes in front: App -> us -> debuggerd After we put ourself back at the front: Us -> app -> us -> app -> .... stack overflow. Bug: 17620677 Change-Id: I9183997e3d5ebd51c320b5d51425be5142e938f3 (cherry picked from commit 1f24296c7c8a6501ee2388c0d20b48f471b48660)
|
1f24296c7c8a6501ee2388c0d20b48f471b48660 |
|
16-Oct-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add way to ensure we are at the front of the sigaction chain Calling this after jni_on_load fixes the unity apps. This is not exactly correct since we may already have the following chain. Start up: Us -> debuggerd After app goes in front: App -> us -> debuggerd After we put ourself back at the front: Us -> app -> us -> app -> .... stack overflow. Bug: 17620677 Change-Id: I9183997e3d5ebd51c320b5d51425be5142e938f3
|
928f72bd75c385ba2708c58521171a77264d4486 |
|
10-Sep-2014 |
Andreas Gampe <agampe@google.com> |
ART: Fix things for valgrind Wire up valgrind gtests. Add valgrind-test-art-host, currently only depending on valgrind-test-art-host-gtest32. Fix an Alloc setting to allow running valgrind. Refactor the fault handler to manage (and correctly release) the handlers. Fix minor failure-case leaks exposed by tests. Failing tests: The optimizing compiler is leaking non-arena-ed structures (e.g., assembler buffers), as code generators are not destroyed. The solution has been moved to a follow-up CL. Note: All 64b tests are failing as we cannot allocate a heap. Change-Id: I7f854cfd098d9f68107ce492363e7dba9a82b9fa
|
8ce6b9040747054b444a7fa706503cd257801936 |
|
26-Aug-2014 |
Dave Allison <dallison@google.com> |
Handle nested signals This allows for signals to be raised inside the ART signal handler. This can occur when the JavaStackTraceHandler attempts to generate a stack trace and something goes wrong. It also fixes an issue where the fault manager was not being correctly shut down inside the signal chaining code. In this case the signal handler was not restored to the original. Bug: 17006816 Bug: 17133266 (cherry picked from commit fabe91e0d558936ac26b98d2b4ee1af08f58831d) Change-Id: I10730ef52d5d8d34610a5293253b3be6caf4829e
|
fabe91e0d558936ac26b98d2b4ee1af08f58831d |
|
26-Aug-2014 |
Dave Allison <dallison@google.com> |
Handle nested signals This allows for signals to be raised inside the ART signal handler. This can occur when the JavaStackTraceHandler attempts to generate a stack trace and something goes wrong. It also fixes an issue where the fault manager was not being correctly shut down inside the signal chaining code. In this case the signal handler was not restored to the original. Bug: 17006816 Bug: 17133266 Change-Id: I9c25bf4f6921e6a107aefbdf47d2c0db9f41508f
|
1f8ef6fa2fb5d79799371f8bf745824b78bc48f2 |
|
21-Aug-2014 |
Dave Allison <dallison@google.com> |
Fix fault handler to unregister on shutdown This fixes a problem with the fault handler where it wasn't unregistering itself during shutdown of the runtime. Bug: 17133266 (cherry picked from commit e8b9afcd0cd86b8808af29a97332038aab70c604) Change-Id: I1a4ec4292ec049046dda30769265680201729efb
|
e8b9afcd0cd86b8808af29a97332038aab70c604 |
|
21-Aug-2014 |
Dave Allison <dallison@google.com> |
Fix fault handler to unregister on shutdown This fixes a problem with the fault handler where it wasn't unregistering itself during shutdown of the runtime. Bug: 17133266 Change-Id: If4758b14ded0fba194897191b1a8d8d7b0b3e6e5
|
b0f05b9654eb005bc8c8e15f615a7f5a312f640c |
|
17-Jul-2014 |
Dave Allison <dallison@google.com> |
Add implicit checks for x86_64 architecture. This combines the x86 and x86_64 fault handlers into one. It also merges in the change to the entrypoints for X86_64. Replaces generic instruction length calculator with one that only works with the specific instructions we use. Bug: 16256184 Change-Id: I1e8ab5ad43f46060de9597615b423c89a836035c Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
|
dfd3b47813c14c5f1607cbe7b10a28b1b2f29cbc |
|
17-Jul-2014 |
Dave Allison <dallison@google.com> |
Add implicit checks for x86_64 architecture. This combines the x86 and x86_64 fault handlers into one. It also merges in the change to the entrypoints for X86_64. Replaces generic instruction length calculator with one that only works with the specific instructions we use. Bug: 16256184 Change-Id: I1e8ab5ad43f46060de9597615b423c89a836035c Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
|
147eb41b53729ec8d5c188d1cac90964a51afb8a |
|
11-Jul-2014 |
Dave Allison <dallison@google.com> |
Revert "Revert "Revert "Revert "Add implicit null and stack checks for x86"""" This reverts commit 0025a86411145eb7cd4971f9234fc21c7b4aced1. Bug: 16256184 Change-Id: Ie0760a0c293aa3b62e2885398a8c512b7a946a73 Conflicts: compiler/dex/quick/arm64/target_arm64.cc compiler/image_test.cc runtime/fault_handler.cc
|
69dfe51b684dd9d510dbcb63295fe180f998efde |
|
11-Jul-2014 |
Dave Allison <dallison@google.com> |
Revert "Revert "Revert "Revert "Add implicit null and stack checks for x86"""" This reverts commit 0025a86411145eb7cd4971f9234fc21c7b4aced1. Bug: 16256184 Change-Id: Ie0760a0c293aa3b62e2885398a8c512b7a946a73
|
7fb36ded9cd5b1d254b63b3091f35c1e6471b90e |
|
10-Jul-2014 |
Dave Allison <dallison@google.com> |
Revert "Revert "Add implicit null and stack checks for x86"" Fixes x86_64 cross compile issue. Removes command line options and property to set implicit checks - this is hard coded now. This reverts commit 3d14eb620716e92c21c4d2c2d11a95be53319791. Change-Id: I5404473b5aaf1a9c68b7181f5952cb174d93a90d
|
0025a86411145eb7cd4971f9234fc21c7b4aced1 |
|
11-Jul-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Revert "Revert "Add implicit null and stack checks for x86""" Broke the build. This reverts commit 7fb36ded9cd5b1d254b63b3091f35c1e6471b90e. Change-Id: I9df0e7446ff0913a0e1276a558b2ccf6c8f4c949
|
34e826ccc80dc1cf7c4c045de6b7f8360d504ccf |
|
29-May-2014 |
Dave Allison <dallison@google.com> |
Add implicit null and stack checks for x86 This adds compiler and runtime changes for x86 implicit checks. 32 bit only. Both host and target are supported. By default, on the host, the implicit checks are null pointer and stack overflow. Suspend is implemented but not switched on. Change-Id: I88a609e98d6bf32f283eaa4e6ec8bbf8dc1df78a
|
3d14eb620716e92c21c4d2c2d11a95be53319791 |
|
10-Jul-2014 |
Dave Allison <dallison@google.com> |
Revert "Add implicit null and stack checks for x86" It breaks cross compilation with x86_64. This reverts commit 34e826ccc80dc1cf7c4c045de6b7f8360d504ccf. Change-Id: I34ba07821fc0a022fda33a7ae21850957bbec5e7
|
576ca0cd692c0b6ae70e776de91015b8ff000a08 |
|
07-Jun-2014 |
Ian Rogers <irogers@google.com> |
Reduce header files including header files. Main focus is getting heap.h out of runtime.h. Change-Id: I8d13dce8512816db2820a27b24f5866cc871a04b
|
eb8167a4f4d27fce0530f6724ab8032610cd146b |
|
08-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add Handle/HandleScope and delete SirtRef. Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
|
c751fdcc9491c1b60c3db517fbc41bb98e92441f |
|
31-Mar-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add handler for printing java stack traces for compiled code SIGSEGV. Added a new FaultHandler which attempts to print a java stack trace when a SIGSEGV occurse in generated code. This should help debugging compiler and GC related heap corruption. Bug: 13725693 Bug: 12934910 Change-Id: Id54d83ea180c222eb86d449c61926e83f0b026ad
|
b373e091eac39b1a79c11f2dcbd610af01e9e8a9 |
|
21-Feb-2014 |
Dave Allison <dallison@google.com> |
Implicit null/suspend checks (oat version bump) This adds the ability to use SEGV signals to throw NullPointerException exceptions from Java code rather than having the compiler generate explicit comparisons and branches. It does this by using sigaction to trap SIGSEGV and when triggered makes sure it's in compiled code and if so, sets the return address to the entry point to throw the exception. It also uses this signal mechanism to determine whether to check for thread suspension. Instead of the compiler generating calls to a function to check for threads being suspended, the compiler will now load indirect via an address in the TLS area. To trigger a suspend, the contents of this address are changed from something valid to 0. A SIGSEGV will occur and the handler will check for a valid instruction pattern before invoking the thread suspension check code. If a user program taps SIGSEGV it will prevent our signal handler working. This will cause a failure in the runtime. There are two signal handlers at present. You can control them individually using the flags -implicit-checks: on the runtime command line. This takes a string parameter, a comma separated set of strings. Each can be one of: none switch off null null pointer checks suspend suspend checks all all checks So to switch only suspend checks on, pass: -implicit-checks:suspend There is also -explicit-checks to provide the reverse once we change the default. For dalvikvm, pass --runtime-arg -implicit-checks:foo,bar The default is -implicit-checks:none There is also a property 'dalvik.vm.implicit_checks' whose value is the same string as the command option. The default is 'none'. For example to switch on null checks using the option: setprop dalvik.vm.implicit_checks null It only works for ARM right now. Bumps OAT version number due to change to Thread offsets. Bug: 13121132 Change-Id: If743849138162f3c7c44a523247e413785677370
|