[horde] php-4.4.0 woes

Graeme Wood Graeme.Wood at ed.ac.uk
Mon Jul 18 03:20:35 PDT 2005


Most of these reference problems are fixed in 3.0.5-RC2.  I submitted some
more to the Horde team over the weekend and they have also been fixed and
I would imagine will appear shortly in 3.0.5-RC3.

On Mon, 18 Jul 2005, Joeri Pronk wrote:

> Most of the problems are with using a & before a function call:
> $ref = &this_function_returns_a_reference();
>
> Only thing that needs to be done is to remove the & before the function
> call. The function is defined as to return a reference, in this case
> older PHP versions would try to reference the reference which could
> cause the memory corruption.
>
> The other problem with references lies in functions which return (the
> rsults of) functions or expressions. They need to be rewritten to
> return a variable.
>
> old:
> function &get_something() {
>   return some_otherthing();
> }
> new:
> function &get_something() {
>   $value=some_otherthing();
>   return $value;
> }
>
> I wonder if anybody on the horde project is already looking into this,
> or should I post a bug report on this?
> If not I will hereby volunteer to make some patches to solve this problem.
>
>
> ----- Bericht van dick at nagual.st ---------
>     Datum: Sun, 17 Jul 2005 16:38:28 +0200
>       Van: dick hoogendijk <dick at nagual.st>
> Antwoorden aan:dick hoogendijk <dick at nagual.st>
> Onderwerp: Re: [horde] php-4.4.0 woes
>       Aan: horde <horde at lists.horde.org>
>
>
> > On 17 Jul Joeri Pronk wrote:
> >
> >> I can confirm this, 4.4.0 contains some serious memory corruption
> >> fixes when using references.
> >
> > Glad to hear this, although..
> >
> >> As I see it all the code needs to reviewed for incorrect references,
> >> fortunately they are easy to fix.
> >
> > Easy to fix? Can you tell me more on this please?
> >
> > --
> > dick -- http://nagual.st/ -- PGP/GnuPG key: F86289CE
> > ++ Running FreeBSD 4.11-stable ++ FreeBSD 5.4
> > + Nai tiruvantel ar vayuvantel i Valar tielyanna nu vilja
> > --
> > Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: horde-unsubscribe at lists.horde.org
> >
>
>
> ----- Einde bericht van dick at nagual.st -----
>
>
>
>

-- 
=============================================================================
Graeme Wood                                 Email: Graeme.Wood at ed.ac.uk
Unix Systems Support                        Phone: +44 131 650 5003
The University of Edinburgh                 Fax:   +44 131 650 6552
=============================================================================


More information about the horde mailing list