blob: aa32441feec69b6b68142a24e91799fa05be2d52 [file] [log] [blame]
#include <stdlib.h>
#include <thread>
#include <unistd.h>
#include <vector>
void *sleep_worker(void *in) {
sleep(30);
sleep(30);
return nullptr;
}
void *crash_worker(void *in) {
sleep(1);
volatile int *p = nullptr; // break here
return (void *)*p;
}
int main() {
std::vector<std::thread> threads;
threads.push_back(std::move(std::thread(crash_worker, nullptr)));
for (int i = 0; i < 15; i++)
threads.push_back(std::move(std::thread(sleep_worker, nullptr)));
sleep(10);
}