cmrx icon indicating copy to clipboard operation
cmrx copied to clipboard

Kernel runs into weeds if thread quits

Open ventZl opened this issue 9 months ago • 0 comments

The kernel will panic and start doing weird stuff ending up in ASSERT() inside thread switching machinery if thread quits normally.

Reproduction steps:

Define an application autostart thread:

` int le_thread(void * nope) { return 0; }

OS_THREAD_CREATE(app, le_thread, NULL, 64); `

Once thread quits, kernel will soon end up asserting on stack sanitization routine with kernel stack being completely broken. It is possible that this quit thread has been actually scheduled for execution or some other badness.

ventZl avatar Mar 20 '25 15:03 ventZl