summaryrefslogtreecommitdiff
path: root/exp-sgcheck/tests/preen_invars_so.c
diff options
context:
space:
mode:
authorsewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2011-05-11 16:04:28 +0000
committersewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2011-05-11 16:04:28 +0000
commitd2f95a0c23802cc6694a618bddd314391473f23c (patch)
tree036eb5fd072845dad833b2b21c66be68a8c51303 /exp-sgcheck/tests/preen_invars_so.c
parent889a6aede01eec00a2c523fc9a12f288082d0dae (diff)
Rename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
too much build carnage. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11745 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'exp-sgcheck/tests/preen_invars_so.c')
-rw-r--r--exp-sgcheck/tests/preen_invars_so.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/exp-sgcheck/tests/preen_invars_so.c b/exp-sgcheck/tests/preen_invars_so.c
new file mode 100644
index 00000000..0e59d9ce
--- /dev/null
+++ b/exp-sgcheck/tests/preen_invars_so.c
@@ -0,0 +1,12 @@
+
+/* This file contains a global array. It is compiled into a .so,
+ which is dlopened by preen_invar.c. That then accesses the global
+ array, hence generating Inv_Global invariants in sg_main.c.
+
+ preen_invar.c then dlcloses this object, causing it to get
+ unmapped; and we then need to be sure that the Inv_Global is
+ removed by preen_Invars (or, at least, that the system doesn't
+ crash..). */
+
+char im_a_global_array[10];
+