From d34fce8b176553ee332377f638f21d126b2ea726 Mon Sep 17 00:00:00 2001
From: h2-addad <hamza2.addad@live.uwe.ac.uk>
Date: Sun, 16 Jul 2023 15:25:32 +0000
Subject: [PATCH] Upload New File

---
 src/tests/vm/pt-big-stk-obj.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 src/tests/vm/pt-big-stk-obj.c

diff --git a/src/tests/vm/pt-big-stk-obj.c b/src/tests/vm/pt-big-stk-obj.c
new file mode 100644
index 0000000..6b630ec
--- /dev/null
+++ b/src/tests/vm/pt-big-stk-obj.c
@@ -0,0 +1,20 @@
+/* Allocates and writes to a 64 kB object on the stack.
+   This must succeed. */
+
+#include <string.h>
+#include "tests/arc4.h"
+#include "tests/cksum.h"
+#include "tests/lib.h"
+#include "tests/main.h"
+
+void
+test_main (void)
+{
+  char stk_obj[65536];
+  struct arc4 arc4;
+
+  arc4_init (&arc4, "foobar", 6);
+  memset (stk_obj, 0, sizeof stk_obj);
+  arc4_crypt (&arc4, stk_obj, sizeof stk_obj);
+  msg ("cksum: %lu", cksum (stk_obj, sizeof stk_obj));
+}
-- 
GitLab