Skip to content

Commit

Permalink
Stop running StackOverflowError tests under Android.
Browse files Browse the repository at this point in the history
They sometimes cause [crashes](https://cs.android.com/android/_/android/platform/art/+/c2e20629c7dfdb0f679fa30c14b41fe68588697f:runtime/gc/heap.cc;l=2971;drc=754ff339c776d69ac9caf7a783b3ff280d6bd08b) under the older Android emulators that we currently test with.

PiperOrigin-RevId: 720992512
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jan 29, 2025
1 parent e3e1ec5 commit 13ea3a9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ public void testSetFuture_stackOverflow() {
// call to fail
@J2ktIncompatible
@GwtIncompatible
@AndroidIncompatible
@AndroidIncompatible // b/391667564: crashes from stack overflows
public void testSetFutureToString_stackOverflow() {
SettableFuture<String> orig = SettableFuture.create();
SettableFuture<String> prev = orig;
Expand Down Expand Up @@ -989,6 +989,7 @@ public String toString() {
+ " java.lang.NullPointerException]]");
}

@AndroidIncompatible // b/391667564: crashes from stack overflows
public void testSetIndirectSelf_toString() {
final SettableFuture<Object> orig = SettableFuture.create();
// unlike the above this indirection defeats the trivial cycle detection and causes a SOE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,7 @@ public BarChild apply(Foo unused) {
assertSame(barChild, bar);
}

/*
* Android does not handle this stack overflow gracefully... though somehow some other
* stack-overflow tests work. It must depend on the exact place the error occurs.
*/
@AndroidIncompatible
@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testTransform_stackOverflow() throws Exception {
Expand Down Expand Up @@ -473,11 +469,7 @@ public ListenableFuture<Bar> apply(Foo unused) {
assertFalse(((AbstractFuture<?>) f2).wasInterrupted());
}

/*
* Android does not handle this stack overflow gracefully... though somehow some other
* stack-overflow tests work. It must depend on the exact place the error occurs.
*/
@AndroidIncompatible
@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testTransformAsync_stackOverflow() throws Exception {
Expand Down Expand Up @@ -1316,6 +1308,7 @@ public void testCatching_customTypeNoMatch() throws Exception {
assertThat(expected).hasCauseThat().isInstanceOf(RuntimeException.class);
}

@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testCatching_stackOverflow() throws Exception {
Expand Down Expand Up @@ -1445,6 +1438,7 @@ public void testCatchingAsync_customTypeNoMatch() throws Exception {
assertThat(expected).hasCauseThat().isInstanceOf(RuntimeException.class);
}

@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testCatchingAsync_stackOverflow() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ public void testSetFuture_stackOverflow() {
// call to fail
@J2ktIncompatible
@GwtIncompatible
@AndroidIncompatible
@AndroidIncompatible // b/391667564: crashes from stack overflows
public void testSetFutureToString_stackOverflow() {
SettableFuture<String> orig = SettableFuture.create();
SettableFuture<String> prev = orig;
Expand Down Expand Up @@ -989,6 +989,7 @@ public String toString() {
+ " java.lang.NullPointerException]]");
}

@AndroidIncompatible // b/391667564: crashes from stack overflows
public void testSetIndirectSelf_toString() {
final SettableFuture<Object> orig = SettableFuture.create();
// unlike the above this indirection defeats the trivial cycle detection and causes a SOE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,7 @@ public BarChild apply(Foo unused) {
assertSame(barChild, bar);
}

/*
* Android does not handle this stack overflow gracefully... though somehow some other
* stack-overflow tests work. It must depend on the exact place the error occurs.
*/
@AndroidIncompatible
@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testTransform_stackOverflow() throws Exception {
Expand Down Expand Up @@ -473,11 +469,7 @@ public ListenableFuture<Bar> apply(Foo unused) {
assertFalse(((AbstractFuture<?>) f2).wasInterrupted());
}

/*
* Android does not handle this stack overflow gracefully... though somehow some other
* stack-overflow tests work. It must depend on the exact place the error occurs.
*/
@AndroidIncompatible
@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testTransformAsync_stackOverflow() throws Exception {
Expand Down Expand Up @@ -1316,6 +1308,7 @@ public void testCatching_customTypeNoMatch() throws Exception {
assertThat(expected).hasCauseThat().isInstanceOf(RuntimeException.class);
}

@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testCatching_stackOverflow() throws Exception {
Expand Down Expand Up @@ -1445,6 +1438,7 @@ public void testCatchingAsync_customTypeNoMatch() throws Exception {
assertThat(expected).hasCauseThat().isInstanceOf(RuntimeException.class);
}

@AndroidIncompatible // b/391667564: crashes from stack overflows
@J2ktIncompatible
@GwtIncompatible // StackOverflowError
public void testCatchingAsync_stackOverflow() throws Exception {
Expand Down

0 comments on commit 13ea3a9

Please sign in to comment.