develooper Front page | perl.perl5.porters | Postings from July 2022

Re: perl-5.37.1 breaks texinfo-6.8

Thread Previous | Thread Next
Uwe Düffert
July 13, 2022 21:47
Re: perl-5.37.1 breaks texinfo-6.8
Message ID:
On Tue, 12 Jul 2022, Karl Williamson wrote:

>>> If you have valgrind, or clang asan or similar, could you try running 
>>> that?
> I suspect and hope that the attached patch will fix it.
No, it does not. It is still broken the same way. However, 
0003-locale.c-Add-missing-savepv.patch makes a difference, the number 
of memory leaks seems to be reduced according to valgrind.
You may want to have a look at (the bottom of)  vs.

But the problem is not memory leaks, it is invalid memory access. Which my 
initial report already suggested (*random* unknown character in a static 
test case that is not there with perl-5.37.0 and not with debug code and 
not with valgrind protection). Valgrind supports that theory by
"Invalid read of size *" - only with 5.37.1.
For that, you may want to have a look at (the top of)  vs.

As this still gives you no clue where stuff breaks, I further reduced the 
testcase from within texinfo to:

I stripped anything unneeded from the end of the texi2any perl file and 
added relevant output, moved as far up as I could to reveal the problem.
Everything is still good at
$saved_LC_ALL1 = POSIX::setlocale(LC_ALL);
, but only a few lines later
$saved_LC_ALL2 = POSIX::setlocale(LC_ALL);
is broken with unknown characters.
The full valgrind output of that reduced case is longer because the 
stripped end of texi2any produces more memory leaks, but the problem is 
the memory corruption between getting and printing $saved_LC_ALL1 and 
$saved_LC_ALL2 as shown in

In that logfile $saved_LC_ALL2 looks good only due to valgrind, without 
valgrind the memory corruption reported inbetween visibly damages 
$saved_LC_ALL2   (which in texinfos original use-case panics 
significantly later when trying to setlocale() back to $saved_LC_ALL).

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About