summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2016-01-17 12:47:56 +0000
committerAaron Crane <arc@cpan.org>2016-01-17 13:26:54 +0000
commit5ca5a62834a7fccb204c7fd4b35a11873d1bdd3b (patch)
tree7b9e98ca04a54dafa0b546a8d27590d1370591cf /intrpvar.h
parentbc5be890d7aac81a5f93f2a2afccaf25cf374a38 (diff)
downloadperl-5ca5a62834a7fccb204c7fd4b35a11873d1bdd3b.tar.gz
RT #127212: retain binary compatibility across plain/DEBUGGING
Niko Tyni of Debian points out that the size of the interpreter structure differs between plain and -DDEBUGGING builds, and that this breaks binary compatibility of XS modules between such builds. Making the definition of PL_memory_debug_header unconditional on PERL_TRACK_MEMPOOL (which itself is defined only on debug builds) eliminates this needless incompatibility. There is some confusion about whether plain and debug builds are expected to be compatible. Commit 1e8125c621275d18c74bc8dae3bfc3c03929fe1e (July 2010) refers in passing to "binary incompatible perls with the same API version (i.e. the same perl version configured with and without DEBUGGING)". But f2b88940d815760ad254d35a0ee1eb2ed8ce7762 (November 2009) says explicitly that "-DDEBUGGING and not need to be binary compatible with each other", and I think this explicit statement is a better example to follow. Further, this compatibility is clearly useful for our downstream packagers (as reported by Niko), and for any users who'd like to be able to use a debug build for tracking down problems (including those encountered while using modules with XS parts).
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/intrpvar.h b/intrpvar.h
index d44f1f2e6c..de700a04fe 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -780,10 +780,11 @@ PERLVARI(I, my_cxt_keys, const char **, NULL) /* per-module array of pointers to
# endif
#endif
-#ifdef PERL_TRACK_MEMPOOL
-/* For use with the memory debugging code in util.c */
+/* For use with the memory debugging code in util.c. This is used only in
+ * DEBUGGING builds, but defining it in non-debug builds too means that we
+ * retain binary compatibility between otherwise-compatible plain and debug
+ * builds. */
PERLVAR(I, memory_debug_header, struct perl_memory_debug_header)
-#endif
#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
/* File descriptor to talk to the child which dumps scalars. */