diff options
author | Pali <pali@cpan.org> | 2018-09-28 13:17:01 +0200 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2018-10-29 15:32:23 +1100 |
commit | 5ace197f9a644bde21b1b41430099295ed92365e (patch) | |
tree | ddfbd08f84e84f4929757d0783d3545f8034da98 | |
parent | 238fb9b3844424a58811fb7947219a2c016ee3b0 (diff) | |
download | perl-5ace197f9a644bde21b1b41430099295ed92365e.tar.gz |
Define also Perl's calloc() macro
Functions malloc(), realloc() and free() are already redefined to
PerlMem_malloc(), PerlMem_realloc() and PerlMem_free(). But calloc() not.
This leads to the problem that memory by calloc() is allocated by system
C library, but freed by Perl's PerlMem_free() which just cause memory
corruptions.
-rw-r--r-- | XSUB.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -609,6 +609,7 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">. # define utime PerlLIO_utime # define write PerlLIO_write # define malloc PerlMem_malloc +# define calloc PerlMem_calloc # define realloc PerlMem_realloc # define free PerlMem_free # define abort PerlProc_abort |