<div dir="ltr"><div>Hi all,<br></div><div><br></div><div>After implementing the ToyVM::runApplication method, I run the ToyVM binary, A segmentation fault occurs on starting ToyThread.</div><div><br></div><div>My code is:</div>
<div><br></div><div>void ToyVM::runApplication(int argc, char** argv) {<br> ToyThread *tt = new ToyThread(this);<br> mainThread = tt;<br> typedef void (*vmkitThreadfptr)(vmkit::Thread*);<br> void (*mainStartPtr)(vmkit::Thread*);<br>
mainStartPtr = (vmkitThreadfptr)(&mainStart);<br> startRes = tt->start(mainStartPtr);<br>}</div><div><br></div><div>by tracing, the error occurs in the following line of LockNormal::lock() method</div><div>pthread_mutex_lock((pthread_mutex_t*)&internalLock);</div>
<div><br></div><div>Best regards,<br>Mkh</div></div>