aboutsummaryrefslogtreecommitdiff
path: root/tests/i/memory-uncaught
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i/memory-uncaught')
-rw-r--r--tests/i/memory-uncaught/case.json1
-rw-r--r--tests/i/memory-uncaught/expected.txt2
-rw-r--r--tests/i/memory-uncaught/notes.md5
-rw-r--r--tests/i/memory-uncaught/program.cps5
4 files changed, 13 insertions, 0 deletions
diff --git a/tests/i/memory-uncaught/case.json b/tests/i/memory-uncaught/case.json
new file mode 100644
index 0000000..2c4afe3
--- /dev/null
+++ b/tests/i/memory-uncaught/case.json
@@ -0,0 +1 @@
+{"exit_code": 1}
diff --git a/tests/i/memory-uncaught/expected.txt b/tests/i/memory-uncaught/expected.txt
new file mode 100644
index 0000000..448a57b
--- /dev/null
+++ b/tests/i/memory-uncaught/expected.txt
@@ -0,0 +1,2 @@
+[Fatal] line 5: Invalid memory address (not an active allocation)
+Unhandled exception. Program terminated.
diff --git a/tests/i/memory-uncaught/notes.md b/tests/i/memory-uncaught/notes.md
new file mode 100644
index 0000000..3d7f2df
--- /dev/null
+++ b/tests/i/memory-uncaught/notes.md
@@ -0,0 +1,5 @@
+# Trace notes
+
+Human review: pending.
+
+The second free prints its line and reason, then throws. The generated main handler prints the termination message and returns 1. This is an extension, tested through native and configured runner execution.
diff --git a/tests/i/memory-uncaught/program.cps b/tests/i/memory-uncaught/program.cps
new file mode 100644
index 0000000..85b96a8
--- /dev/null
+++ b/tests/i/memory-uncaught/program.cps
@@ -0,0 +1,5 @@
+TYPE Raw = C_TYPE("void*")
+DECLARE P : Raw
+P <- MALLOC(8)
+FREE(P)
+FREE(P)