Blame SOURCES/rhbz1643997.0028-testcase-for-PR23875.patch

cab4ad
From c3023bef537648b282f266878ea8de7a350b3a45 Mon Sep 17 00:00:00 2001
cab4ad
From: Serhei Makarov <smakarov@redhat.com>
cab4ad
Date: Fri, 9 Nov 2018 16:42:21 -0500
cab4ad
Subject: [PATCH 28/32] testcase for PR23875
cab4ad
cab4ad
This triggers a 'stack smashing' error in the userspace interpreter.
cab4ad
cab4ad
* testsuite/systemtap.bpf/bpf_tests/pr23875.stp: New testcase.
cab4ad
---
cab4ad
 testsuite/systemtap.bpf/bpf_tests/pr23875.stp | 18 ++++++++++++++++++
cab4ad
 1 file changed, 18 insertions(+)
cab4ad
 create mode 100644 testsuite/systemtap.bpf/bpf_tests/pr23875.stp
cab4ad
cab4ad
diff --git a/testsuite/systemtap.bpf/bpf_tests/pr23875.stp b/testsuite/systemtap.bpf/bpf_tests/pr23875.stp
cab4ad
new file mode 100644
cab4ad
index 000000000..a31f1d087
cab4ad
--- /dev/null
cab4ad
+++ b/testsuite/systemtap.bpf/bpf_tests/pr23875.stp
cab4ad
@@ -0,0 +1,18 @@
cab4ad
+global t
cab4ad
+
cab4ad
+probe begin {
cab4ad
+  printf("BEGIN\n")
cab4ad
+}
cab4ad
+
cab4ad
+probe kernel.function("vfs_read") {
cab4ad
+  t["key"] = 6
cab4ad
+  exit()
cab4ad
+}
cab4ad
+
cab4ad
+probe end {
cab4ad
+  c = 0
cab4ad
+  foreach (k in t)
cab4ad
+    c++
cab4ad
+  printf("%d\n", c)
cab4ad
+  printf("END PASS\n")
cab4ad
+}
cab4ad
-- 
cab4ad
2.14.5
cab4ad