develooper Front page | perl.perl5.porters | Postings from August 2019

[perl #134126] 'make' fails during '-Dusemymalloc' and'-Dusethreads'

From:
Tony Cook via RT
Date:
August 15, 2019 04:37
Subject:
[perl #134126] 'make' fails during '-Dusemymalloc' and'-Dusethreads'
Message ID:
rt-4.0.24-8458-1565843725-495.134126-15-0@perl.org
On Mon, 08 Jul 2019 23:04:09 -0700, tonyc wrote:
> On Sun, 07 Jul 2019 14:45:46 -0700, jiri.krobot.broz@gmail.com wrote:
> > This is a build failure report for perl from
> > jiri.krobot.broz@gmail.com
> > generated with the help of perlbug 1.41 running under perl 5.30.0.
> >
> >
> > -----------------------------------------------------------------
> > I tried to compile Perl with PERL_MALLOC = define. It failed during
> > complilation of the malloc.c
> > due this code lines:
> > if (nbytes > PTRDIFF_MAX) {
> > #line 1242 -------- ! ERROR !
> >     MYMALLOC_WRITE2STDERR("Memory requests are limited to
> > PTRDIFF_MAX"
> >  " bytes to prevent possible undefined"
> >  " behavior");
> >    return NULL;
> > }
> >
> > MYMALLOC_WRITE2STDERR inherits using 'my_perl' but it is undefined
> > here. It
> > causes this error.
> > I removed the line which is informative only and nmake passed.
> 
> I believe this is fixed in blead at
> 
> commit 9629b6dc1d6296e0d3a6a5dbfd0f672b4b2021ca
> Author: Karl Williamson <khw@cpan.org>
> Date:   Wed May 22 14:37:20 2019 -0600
> 
> PATCH: [perl #134126] -Dusemymalloc, -Dusethreads
> 
> This was due to a missing declaration for thread context needed to
> output a message.
> 
> diff --git a/malloc.c b/malloc.c
> index ed392ee5ba..0c80a0856f 100644
> --- a/malloc.c
> +++ b/malloc.c
> @@ -1239,6 +1239,7 @@ Perl_malloc(size_t nbytes)
>           * malloc so that pointer subtraction in the same structure
> is always
>           * well defined */
>          if (nbytes > PTRDIFF_MAX) {
> +            dTHX;
>              MYMALLOC_WRITE2STDERR("Memory requests are limited to
> PTRDIFF_MAX"
>                                    " bytes to prevent possible
> undefined"
>                                    " behavior");
> 
> Do you get the same error if you build blead perl?

No response, so I'm assuming I'm correct here, merged into 134126 (which is pending release.)

Tony

---
via perlbug:  queue: perl5 status: pending release
https://rt.perl.org/Ticket/Display.html?id=134126



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About