From 8de23ca36173cfdb3c609074496115ebd9045887 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sat, 26 Sep 2026 22:07:16 -0400 Subject: x86_64: make syscall_entry compliant to SYSTEM-V ABI --- sys/syscall.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/syscall.c') diff --git a/sys/syscall.c b/sys/syscall.c index 0da3475..31f9078 100644 --- a/sys/syscall.c +++ b/sys/syscall.c @@ -50,6 +50,10 @@ int _syscall_handle_switch(syscall_context_t *ctx) { uint8_t target_type = obj_gettype(ctx->target.obj); + if(target_type == JOVE_OBJ_NONE) { + klogf("Tried to call syscall on NULL object %P\n", ctx->header->path, ctx->header->pathlen); + return -EBADOBJ; + } if(target_type > 0x7F) { return _syscall_handle_arch(ctx); } -- cgit v1.2.3