diff --git a/src/system/kernel/arch/x86/64/descriptors.cpp b/src/system/kernel/arch/x86/64/descriptors.cpp
index 993dfdf212..12f51c64e2 100644
a
|
b
|
x86_64_general_protection_fault(iframe* frame)
|
329 | 329 | } |
330 | 330 | |
331 | 331 | |
| 332 | static void |
| 333 | x86_64_stack_fault_exception(iframe* frame) |
| 334 | { |
| 335 | // Non-canonical address accesses which reference the stack cause a stack |
| 336 | // fault exception instead of GPF. However, we can treat it like a GPF. |
| 337 | x86_64_general_protection_fault(frame); |
| 338 | } |
| 339 | |
| 340 | |
332 | 341 | // #pragma mark - |
333 | 342 | |
334 | 343 | |
… |
… |
x86_descriptors_init(kernel_args* args)
|
381 | 390 | table[9] = x86_fatal_exception; // Coprocessor Segment Overrun |
382 | 391 | table[10] = x86_fatal_exception; // Invalid TSS Exception (#TS) |
383 | 392 | table[11] = x86_fatal_exception; // Segment Not Present (#NP) |
384 | | table[12] = x86_fatal_exception; // Stack Fault Exception (#SS) |
| 393 | table[12] = x86_64_stack_fault_exception; // Stack Fault Exception (#SS) |
385 | 394 | table[13] = x86_64_general_protection_fault; // General Protection Exception (#GP) |
386 | 395 | table[14] = x86_page_fault_exception; // Page-Fault Exception (#PF) |
387 | 396 | table[16] = x86_unexpected_exception; // x87 FPU Floating-Point Error (#MF) |
diff --git a/src/system/kernel/arch/x86/arch_int.cpp b/src/system/kernel/arch/x86/arch_int.cpp
index 126e1f37a1..39119416af 100644
a
|
b
|
x86_unexpected_exception(iframe* frame)
|
139 | 139 | signalAddress = frame->ip; |
140 | 140 | break; |
141 | 141 | |
| 142 | case 12: // Stack Fault (#SS) |
| 143 | type = B_STACK_FAULT; |
| 144 | signalNumber = SIGILL; |
| 145 | signalCode = ILL_ILLOPN; |
| 146 | signalAddress = frame->ip; |
| 147 | break; |
| 148 | |
142 | 149 | case 13: // General Protection Exception (#GP) |
143 | 150 | type = B_GENERAL_PROTECTION_FAULT; |
144 | 151 | signalNumber = SIGILL; |