Capture a 64-bit process trying to jump to 32-bit syscall handler

Fixes #591

Adds a simple unittest
This commit is contained in:
Ryan Houdek committed 2024-02-26 05:37:29 -08:00
1 parent 0ef72bf118
commit 4f028b8614
3 files changed
+37

No files matched your search

@@ -5218,6 +5218,9 @@ void OpDispatchBuilder::INTOp(OpcodeArgs) {
constexpr uint8_t SYSCALL_LITERAL = 0x2E;
#endif
if (Literal == SYSCALL_LITERAL) {
if (CTX->Config.Is64BitMode()) [[unlikely]] {
ERROR_AND_DIE_FMT("[Unsupported] Trying to execute 32-bit syscall from a 64-bit process.");
}
// Syscall on linux
SyscallOp<false>(Op);
return;