From b4470f57e2df7de921eee371b960dab817e5b53d Mon Sep 17 00:00:00 2001
From: s2-fidan <Sude2.Fidan@live.uwe.ac.uk>
Date: Thu, 1 Dec 2022 13:01:38 +0000
Subject: [PATCH] vaddr error

---
 src/userprog/syscall.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c
index b4522f8..b83df34 100644
--- a/src/userprog/syscall.c
+++ b/src/userprog/syscall.c
@@ -4,6 +4,7 @@
 #include <syscall-nr.h>
 #include "threads/interrupt.h"
 #include "threads/thread.h"
+#include "threads/vaddr.h"
 
 static void syscall_handler (struct intr_frame *);
 
@@ -133,8 +134,6 @@ static int read(void *src, void *dst, size_t bytes)
   {
     value = get_user(src + i);
     if (value == -1) // segfault or invalid memory access
-      fail_invalid_access();
-
     *(char *)(dst + i) = value & 0xff;
   }
   return (int)bytes;
-- 
GitLab