[haiku-bugs] Re: [Haiku] #16736: Kernel Panic on user_unblock_thread Syscall

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 09 Jan 2021 16:27:40 -0000

#16736: Kernel Panic on user_unblock_thread Syscall
----------------------------+-------------------------
  Reporter:  thosewhowork   |      Owner:  nobody
      Type:  bug            |     Status:  new
  Priority:  normal         |  Milestone:  Unscheduled
 Component:  System/Kernel  |    Version:  R1/beta2
Resolution:                 |   Keywords:
Blocked By:                 |   Blocking:
  Platform:  All            |
----------------------------+-------------------------
Comment (by thosewhowork):

 Hi Korli,

 My bad, here's a hacky test program that should reproduce the bug by brute
 forcing thread ids:

 {{{
 #include <dlfcn.h>

 typedef signed int (*syscall_kern_unblock_thread)(int, int);

 int
 main(int argc, char** argv) {
     int i = 0;
     syscall_kern_unblock_thread p_kern_unblock_thread = NULL;

     if ((p_kern_unblock_thread = dlsym(RTLD_DEFAULT,
 "_kern_unblock_thread")) == NULL) {
         return 1;
     }

     for (; i < 20000; i++) {
         p_kern_unblock_thread(i, i);
     }

     return 0;
 }
 }}}

 Compiled with:

 {{{
 gcc -Wall -o unblock_thread_syscall src/unblock_thread_syscall.c
 }}}
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16736#comment:3>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: