Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 524 forks source link

allow building with high-water mark to be independent of -DDEBUGGING #22131

Closed tonycoz closed 2 weeks ago

tonycoz commented 3 weeks ago

This allows a debugging perl to be built with the high water mark checks disabled, or a non-debugging perl to be built with the high water marks enabled.

This should allow Debian, the reporter for #16607 to build both their normal perl and debugperl with the same state of high water mark checks and avoid the mismatch between a debugperl and non-debug dynamic extension.

Fixes #16607

Ideally Debian (@ntyni ?) would check this does what they need.

ntyni commented 2 weeks ago

Hi, I can confirm that this should solve our use case in #16607. We are currently patching the HWM checks away, and this would allow us to drop the patch and build our debugperl with -DPERL_NO_HWM to get the same effect (= allow it to load XS modules built with the normal non-DEBUGGING perl.)

I tested the combinations and they worked as I expected: XS modules installed from CPAN with a default non-DEBUGGING perl

The tests I used were from #16607:

perl -MDateTime -e 'print DateTime->today'

printf '<AAA>\n<DDD/><CCC><DDD>\n</DDD></CCC>\n</AAA>' | perl -MXML​::LibXML -e 'XML​::LibXML->new->parse_fh(*STDIN)->documentElement->childNodes; '

Many thanks for your work on this!