1 #include <stdlib.h> 2 #include <thread> 3 #include <unistd.h> 4 #include <vector> 5 sleep_worker(void * in)6void *sleep_worker(void *in) { 7 sleep(30); 8 sleep(30); 9 return nullptr; 10 } 11 crash_worker(void * in)12void *crash_worker(void *in) { 13 sleep(1); 14 volatile int *p = nullptr; // break here 15 return (void *)*p; 16 } 17 main()18int main() { 19 std::vector<std::thread> threads; 20 threads.push_back(std::move(std::thread(crash_worker, nullptr))); 21 for (int i = 0; i < 15; i++) 22 threads.push_back(std::move(std::thread(sleep_worker, nullptr))); 23 sleep(10); 24 } 25