Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-20 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 10/10/2014 10:39, Remi Collet a écrit : > Hi, > > See https://bugs.php.net/63595 > > > Short, changing gmp memory allocator can cause segfaults in > various case where gnutls is used and initialized "before" gmp. > > - php + gmp + curl => segfau

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-11 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 11/10/2014 08:17, Remi Collet a écrit : > Le 11/10/2014 07:37, Remi Collet a écrit : > >> I will try to create a patch, for test, as we really need to fix >> this problem, especially it gmp going to go into core (bigint >> patch). > > See > htt

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 11/10/2014 07:37, Remi Collet a écrit : > I will try to create a patch, for test, as we really need to fix > this problem, especially it gmp going to go into core (bigint > patch). See https://bugs.php.net/patch-display.php?bug=63595&patch=gmp-mem

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 11/10/2014 02:24, Rasmus Lerdorf a écrit : > On 10/10/2014 09:50 AM, Stas Malyshev wrote: >> Hi! >> >>> Can you please elaborate a little ? Doesn't such leak have to >>> be fixed in ext/gmp ? >> >> We clean up the memory at the end of the request.

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Andrea Faulds
On 10 Oct 2014, at 13:08, Remi Collet wrote: > Le 10/10/2014 12:57, Andrea Faulds a écrit : >> >> >> 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.

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Rasmus Lerdorf
On 10/10/2014 09:50 AM, Stas Malyshev wrote: > Hi! > >> Can you please elaborate a little ? >> Doesn't such leak have to be fixed in ext/gmp ? > > We clean up the memory at the end of the request. But if the request > ended abnormally and we had some active gmp objects, with gmp data > allocated

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Andrea Faulds
On 10 Oct 2014, at 17:50, Stas Malyshev wrote: > Hi! > >> Can you please elaborate a little ? >> Doesn't such leak have to be fixed in ext/gmp ? > > We clean up the memory at the end of the request. But if the request > ended abnormally and we had some active gmp objects, with gmp data > alloc

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Stas Malyshev
Hi! > Can you please elaborate a little ? > Doesn't such leak have to be fixed in ext/gmp ? We clean up the memory at the end of the request. But if the request ended abnormally and we had some active gmp objects, with gmp data allocated outside emalloc we could not clean that and it ends up bein

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Remi Collet
-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 >> wrote: >> >> Short, changing gmp memory allocator can cause segfaults in >> various case where gnutls is used and initialized "before" gmp. >> >> - - php + g

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Andrea Faulds
> On 10 Oct 2014, at 09:39, Remi Collet 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 +

Re: [PHP-DEV] GMP memory allocator, various issues

2014-10-10 Thread Nikita Popov
On Fri, Oct 10, 2014 at 10:39 AM, Remi Collet wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > See https://bugs.php.net/63595 > > > Short, changing gmp memory allocator can cause segfaults in various > case where gnutls is used and initialized "before" gmp. > > - - php + gmp +