summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/process_save_core_minidump/main.cpp
blob: 15daa68e9a648cfef01eca5e3e0d1953fb517036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <cassert>
#include <iostream>
#include <thread>
thread_local size_t lf = 42;

void g() { assert(false); }

void f() { g(); }

size_t h() {
  size_t sum = 0;
  for (size_t i = 0; i < 1000000; ++i)
    for (size_t j = 0; j < 1000000; ++j)
      if ((i * j) % 2 == 0) {
        sum += 1;
      }
  return sum;
}

int main() {
  std::thread t1(f);

  size_t x = h();

  t1.join();

  std::cout << "X is " << x << "\n";
  return 0;
}