diff options
-rw-r--r-- | build/Android.common_test.mk | 8 | ||||
-rw-r--r-- | runtime/entrypoints/entrypoint_utils.cc | 8 | ||||
-rw-r--r-- | runtime/gc/heap.cc | 4 | ||||
-rw-r--r-- | test/004-SignalTest/src/Main.java | 3 | ||||
-rw-r--r-- | test/Android.run-test.mk | 1 |
5 files changed, 7 insertions, 17 deletions
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk index 0ae42dd383..8e3807855c 100644 --- a/build/Android.common_test.mk +++ b/build/Android.common_test.mk @@ -26,14 +26,6 @@ ART_TARGET_CFLAGS += -DART_TARGET_NATIVETEST_DIR=${ART_TARGET_NATIVETEST_DIR} # List of known broken tests that we won't attempt to execute. The test name must be the full # rule name such as test-art-host-oat-optimizing-HelloWorld64. ART_TEST_KNOWN_BROKEN := \ - test-art-target-run-test-gcstress-optimizing-prebuild-004-SignalTest32 \ - test-art-target-run-test-gcstress-optimizing-norelocate-004-SignalTest32 \ - test-art-target-run-test-gcstress-default-prebuild-004-SignalTest32 \ - test-art-target-run-test-gcstress-default-norelocate-004-SignalTest32 \ - test-art-target-run-test-gcstress-optimizing-relocate-004-SignalTest32 \ - test-art-target-run-test-gcstress-default-relocate-004-SignalTest32 \ - test-art-target-run-test-gcstress-optimizing-no-prebuild-004-SignalTest32 \ - test-art-target-run-test-gcstress-default-no-prebuild-004-SignalTest32 \ test-art-host-run-test-gcstress-default-prebuild-114-ParallelGC32 \ test-art-host-run-test-gcstress-interpreter-prebuild-114-ParallelGC32 \ test-art-host-run-test-gcstress-optimizing-prebuild-114-ParallelGC32 \ diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index e734d4512d..db51264861 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -183,14 +183,12 @@ void ThrowStackOverflowError(Thread* self) { env->SetObjectField(exc.get(), WellKnownClasses::java_lang_Throwable_stackTrace, stack_trace_elem.get()); - - // Throw the exception. - ThrowLocation throw_location = self->GetCurrentLocationForThrow(); - self->SetException(throw_location, - reinterpret_cast<mirror::Throwable*>(self->DecodeJObject(exc.get()))); } else { error_msg = "Could not create stack trace."; } + // Throw the exception. + self->SetException(self->GetCurrentLocationForThrow(), + reinterpret_cast<mirror::Throwable*>(self->DecodeJObject(exc.get()))); } else { // Could not allocate a string object. error_msg = "Couldn't throw new StackOverflowError because JNI NewStringUTF failed."; diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 26d6117122..2575676bc8 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -2106,7 +2106,9 @@ collector::GcType Heap::CollectGarbageInternal(collector::GcType gc_type, GcCaus ScopedThreadStateChange tsc(self, kWaitingPerformingGc); Locks::mutator_lock_->AssertNotHeld(self); if (self->IsHandlingStackOverflow()) { - LOG(WARNING) << "Performing GC on a thread that is handling a stack overflow."; + // If we are throwing a stack overflow error we probably don't have enough remaining stack + // space to run the GC. + return collector::kGcTypeNone; } bool compacting_gc; { diff --git a/test/004-SignalTest/src/Main.java b/test/004-SignalTest/src/Main.java index 0391592543..8b1f49bacb 100644 --- a/test/004-SignalTest/src/Main.java +++ b/test/004-SignalTest/src/Main.java @@ -20,7 +20,7 @@ public class Main { private static native int testSignal(); private static void stackOverflow() { - stackOverflow(); + stackOverflow(); } public static void main(String[] args) { @@ -40,7 +40,6 @@ public class Main { } try { stackOverflow(); - // Should never get here. throw new AssertionError(); } catch (StackOverflowError e) { diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk index 170ec31418..2abf48eb86 100644 --- a/test/Android.run-test.mk +++ b/test/Android.run-test.mk @@ -215,7 +215,6 @@ TEST_ART_BROKEN_NO_RELOCATE_TESTS := # Tests that are broken with GC stress. TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := \ - 004-SignalTest \ 114-ParallelGC ifneq (,$(filter gcstress,$(GC_TYPES))) |