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

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

Thread Previous
James E Keenan
May 22, 2019 20:10
[perl #134126] 'make' fails during '-Dusemymalloc' and'-Dusethreads'
Message ID:
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #134126]
# in the subject line of all future correspondence about this issue. 
# <URL: >

As first suggested by simcop2387 on #p5p, when you attempt to build 
perl5.30.0 using these two configuration switches, the build fails 
during 'make'.  Bisecting on FreeBSD-11.2, I got this result:

f966a6e60c5062904734d261eea96ba070f47fdb is the first bad commit
commit f966a6e60c5062904734d261eea96ba070f47fdb
Author: Karl Williamson <>
Date:   Sat Feb 16 11:44:56 2019 -0700

     malloc.c: Limit malloc size to PTRDIFF_MAX

     Without doing this, it is possible that the behavior is undefined when
     subtracting two pointers that point to the same object.

     See thread beginning at

     In particular this from Tomasz Konojacki

simcop2387's build report is here:

However, I was able to reproduce this on both Linux and FreeBSD-11 with 
the *combination* of "-Dusemymalloc=y -Dusethreads".  "-Dusemymalloc=y" 
by itself built successfully (though I didn't run tests).

Possibly related ticket:

Bisection command:
git clean -dfx; git bisect reset;perl Porting/ --start=v5.29.6 
--test-build -Dusemymalloc=y -Dusethreads

perl perl perl

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