Merge "Test for std::stack segfault on x86."
diff --git a/tests/device/std_stack_crash/jni/Android.mk b/tests/device/std_stack_crash/jni/Android.mk
new file mode 100644
index 0000000..c9aa9e0
--- /dev/null
+++ b/tests/device/std_stack_crash/jni/Android.mk
@@ -0,0 +1,10 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := stack_crash
+LOCAL_SRC_FILES := stack_crash.cpp
+LOCAL_CFLAGS := -O2
+ifeq ($(TARGET_ARCH_ABI),armeabi)
+    LOCAL_LDFLAGS := -latomic
+endif
+include $(BUILD_EXECUTABLE)
diff --git a/tests/device/std_stack_crash/jni/Application.mk b/tests/device/std_stack_crash/jni/Application.mk
new file mode 100644
index 0000000..87124dd
--- /dev/null
+++ b/tests/device/std_stack_crash/jni/Application.mk
@@ -0,0 +1 @@
+APP_STL := gnustl_static
diff --git a/tests/device/std_stack_crash/jni/stack_crash.cpp b/tests/device/std_stack_crash/jni/stack_crash.cpp
new file mode 100644
index 0000000..4240a83
--- /dev/null
+++ b/tests/device/std_stack_crash/jni/stack_crash.cpp
@@ -0,0 +1,8 @@
+#include <stack>
+#include <string>
+
+// http://b.android.com/220159
+std::stack<std::string> sample;
+int main() {
+  return 0;
+}
diff --git a/tests/device/std_stack_crash/test_config.py b/tests/device/std_stack_crash/test_config.py
new file mode 100644
index 0000000..89729ab
--- /dev/null
+++ b/tests/device/std_stack_crash/test_config.py
@@ -0,0 +1,4 @@
+def run_broken(abi, device_api, toolchain, subtest):
+    if abi == 'x86':
+        return abi, 'http://b.android.com/220159'
+    return None, None