Home | History | Annotate | Download | only in ndk
      1 From 960134fb87a194595f2a0a36290be7961e12b946 Mon Sep 17 00:00:00 2001
      2 From: Cassidy Burden <cburden (a] google.com>
      3 Date: Tue, 9 Aug 2016 09:46:27 -0700
      4 Subject: [PATCH] FOR BISECTION TOOL: Insert error
      5 
      6 Insert error into code that will cause crash. This is the "compiler
      7 error" that we will be triaging. We will be pretending the compiler
      8 mistakenly inserted a nullptr where it shouldn't have.
      9 
     10 This error causes the app to immediately crash upon starting. This makes
     11 it very easy to automatically test the app through adb. Not all compiler
     12 problems will be this easy to test, and may require manual testing from
     13 you (the user). See android/interactive_test.sh for an example on
     14 manual testing from the user.
     15 ---
     16  Teapot/app/src/main/jni/TeapotRenderer.cpp | 2 +-
     17  1 file changed, 1 insertion(+), 1 deletion(-)
     18 
     19 diff --git a/Teapot/app/src/main/jni/TeapotRenderer.cpp b/Teapot/app/src/main/jni/TeapotRenderer.cpp
     20 index 7cafdb3..75cadbf 100644
     21 --- a/Teapot/app/src/main/jni/TeapotRenderer.cpp
     22 +++ b/Teapot/app/src/main/jni/TeapotRenderer.cpp
     23 @@ -58,7 +58,7 @@ void TeapotRenderer::Init() {
     24    num_vertices_ = sizeof(teapotPositions) / sizeof(teapotPositions[0]) / 3;
     25    int32_t stride = sizeof(TEAPOT_VERTEX);
     26    int32_t index = 0;
     27 -  TEAPOT_VERTEX* p = new TEAPOT_VERTEX[num_vertices_];
     28 +  TEAPOT_VERTEX* p = nullptr; //new TEAPOT_VERTEX[num_vertices_];
     29    for (int32_t i = 0; i < num_vertices_; ++i) {
     30      p[i].pos[0] = teapotPositions[index];
     31      p[i].pos[1] = teapotPositions[index + 1];
     32 -- 
     33 2.8.0.rc3.226.g39d4020
     34 
     35