19 #include "crashingthread.h"
23 CrashingThread::CrashingThread(QObject *parent)
29 void CrashingThread::run()
31 qDebug() <<
"Thread " << getThreadNumber()
32 <<
" with pid: " << thread()->currentThreadId()
37 for (
int i = 0; i < 1000; ++i)
39 result = result + sin(i) * tan(i);
42 qDebug() <<
"Thread " << getThreadNumber() <<
" about to rise SIGSEGV\n";
43 volatile int* x = (
int*)42;
47 int CrashingThread::getThreadNumber()
const
52 void CrashingThread::setThreadNumber(
int num)