summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/getcache_mem_corruption.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/getcache_mem_corruption.py b/tests/getcache_mem_corruption.py
new file mode 100644
index 00000000..e127f66e
--- /dev/null
+++ b/tests/getcache_mem_corruption.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+import apt_pkg
+import re
+
+apt_pkg.InitConfig()
+apt_pkg.InitSystem()
+apt_cache = apt_pkg.GetCache()
+# wrong
+apt_depcache = apt_pkg.GetCache(apt_cache)
+# correct: apt_depcache = apt_pkg.GetDepCache(apt_cache)
+re.compile('a')