]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - Valgrind.xs
Make the stack trace test of t/20-bad.t more predictable
[perl/modules/Test-Valgrind.git] / Valgrind.xs
index a9f0eff0cf9a6a7119fc6d7ea849ef95a8124bef..9477f34932e60d88e7692843dd53261b55349b3c 100644 (file)
 
 const char *tv_leaky = NULL;
 
+extern void tv_leak(void) {
+ tv_leaky = malloc(10000);
+
+ return;
+}
+
 /* --- XS ------------------------------------------------------------------ */
 
 MODULE = Test::Valgrind            PACKAGE = Test::Valgrind
@@ -33,7 +39,7 @@ BOOT:
 void
 leak()
 CODE:
- tv_leaky = malloc(10000);
+ tv_leak();
  XSRETURN_UNDEF;
 
 SV *