xref: /aosp_15_r20/external/autotest/client/cros/crash/crasher/bomb.cc (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 extern int DefeatTailOptimizationForBomb();
6 
recbomb(int n)7 __attribute__ ((noinline)) int recbomb(int n) {
8   if (n < 2) {
9     *(char*)0x16 = 0;
10     return 1;
11   }
12   return recbomb(n - 1) + DefeatTailOptimizationForBomb();
13 }
14 
DefeatTailOptimizationForCrasher()15 int DefeatTailOptimizationForCrasher() {
16   return 0;
17 }
18