In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/2273039810f46a2ccd5940a26c7c04f8e039aa8f?hp=1f692f6a78e6beb89aeeae9497d98bc08ac936cf>

- Log -----------------------------------------------------------------
commit 2273039810f46a2ccd5940a26c7c04f8e039aa8f
Author: Tony Cook <t...@develop-help.com>
Date:   Thu Sep 6 14:05:20 2018 +1000

    (perl #133439) fix -Dm reporting for calloc()
    
    a) report both the size and count, and the total allocated rather than
       just the count and total allocated, which was displayed in a
       misleading fashion
    
    b) use %zu formatting to match the original types (size_t) and remove
       the casts to long, which can lose information on Win32, where
       long is 32-bits on x64 builds.

-----------------------------------------------------------------------

Summary of changes:
 util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util.c b/util.c
index ff88a54bf6..a9bf9b8609 100644
--- a/util.c
+++ b/util.c
@@ -439,7 +439,7 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size)
        ptr = (Malloc_t)PerlMem_calloc(count ? count : 1, size ? size : 1);
 #endif
     PERL_ALLOC_CHECK(ptr);
-    DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%" UVxf ": (%05ld) calloc %ld x 
%ld bytes\n",PTR2UV(ptr),(long)PL_an++,(long)count,(long)total_size));
+    DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%" UVxf ": (%05ld) calloc %zu x 
%zu = %zu bytes\n",PTR2UV(ptr),(long)PL_an++, count, size, total_size));
     if (ptr != NULL) {
 #ifdef USE_MDH
        {

-- 
Perl5 Master Repository

Reply via email to