Skip to content

Commit

Permalink
Kernel: Oops, SC_abort was actually calling sys$exit_thread()
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Mar 1, 2021
1 parent 4d006de commit 14aa8e3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Kernel/Syscall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,19 @@ KResultOr<FlatPtr> handle(RegisterState& regs, FlatPtr function, FlatPtr arg1, F
process.tracer_trap(*current_thread, regs); // this triggers SIGTRAP and stops the thread!
}

if (function == SC_exit)
switch (function) {
case SC_abort:
process.sys$abort();
break;
case SC_exit:
process.sys$exit(arg1);
else
break;
case SC_exit_thread:
process.sys$exit_thread(arg1);
VERIFY_NOT_REACHED();
break;
default:
VERIFY_NOT_REACHED();
}
}

if (function == SC_fork || function == SC_sigreturn) {
Expand Down

0 comments on commit 14aa8e3

Please sign in to comment.