Re: GMP memory allocator, various issues
| From: | Remi Collet | Date: | Fri, 10 Oct 2014 12:08:40 +0000 |
| Subject: | Re: GMP memory allocator, various issues | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77848@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 10/10/2014 12:57, Andrea Faulds a écrit :
>
>> On 10 Oct 2014, at 09:39, Remi Collet <remi@fedoraproject.org>
>> wrote:
>>
>> Short, changing gmp memory allocator can cause segfaults in
>> various case where gnutls is used and initialized "before" gmp.
>>
>> - - php + gmp + curl => segfaults - - apache + mod_php +
>> mod_gnutls + gmp => segfaults - - php + gmp + odbc + freetds =>
>> se'gfaults
>>
>>
>> The simple proposal will be to drop the mp_set_memory_functions
>> call.
>>
>> Any other (better) idea ?
>
> Can't we just make gnutls use its own (statically-linked?) gmp
> instance?
Not an option.
As gnutls change will imply downtream change,
and downstream doesn't allowed bundled library.
> I'd rather not make gmp just use malloc. Would cause memory leaks.
Can you please elaborate a little ?
Doesn't such leak have to be fixed in ext/gmp ?
Remi.
> -- Andrea Faulds http://ajf.me/
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlQ3zEgACgkQYUppBSnxahhLOwCfaZ2OlRuYaDAyfyERnUceXO5z
gWIAoM9XmaZFMtKdKe56aQ2aPOOOq9/G
=XbLF
-----END PGP SIGNATURE-----