develooper Front page | perl.perl5.porters | Postings from March 2013

RE: [perl #117239] Re: [perl #117259] Re: Bleadperlv5.17.9-200-g0e0ab62 breaks MLEHMANN/JSON-XS-2.33.tar.gz

Thread Previous | Thread Next
From:
vadim.konovalov
Date:
March 23, 2013 16:59
Subject:
RE: [perl #117239] Re: [perl #117259] Re: Bleadperlv5.17.9-200-g0e0ab62 breaks MLEHMANN/JSON-XS-2.33.tar.gz
Message ID:
DC0095F744C45F45BDD43368AB46582CACF3@FR712WXCHMBA09.zeu.alcatel-lucent.com
> It was clearly and unambiguously a patch. It wasn't in diff 
> format, but it
> was clearly indicating that to make your code more portable, you could
> change  the line:
> 
>     HE *hes [count];
> to
>     #if defined(__BORLANDC__) || defined(_MSC_VER) || 
> defined(__STDC__)
> 	HE **hes = Perl_malloc (count * sizeof (HE));
>     #else
> 	HE *hes [count];
>     #endif

1)
an overlook - it should be 
 	HE **hes = Perl_malloc (count * sizeof (HE*));

it appears that HE is larger than HE* and allocating more memory, hence
misbehaviour is not noticed, but anyway, this isn't correct

2) when that chunk of memory freed? TIA :)

Thread Previous | Thread Next


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