[phpa] static non-empty array issue

  • From: "Nick Lindridge" <nick@xxxxxxxxxxxxxxxxxxxxx>
  • To: <phpa@xxxxxxxxxxxxx>
  • Date: Sun, 28 Apr 2002 10:16:00 -0000 ()

I've just identified an issue that may cause a segfault after nearly 66000
accesses to a cached script that contains non-empty arrays in statics or
class initialisers.

i.e.

static $x = array('one','two','three');

or

class blah { var $x = array('one','two','three'); }

may eventually segfault.  This is fixed for release 1.3

Please note that it only affects initialisers containing non-empty arrays,
and statics and class initialisers of non-arrays or empty arrays are handled
correctly.

Until 1.3 is released, if you suspect that this has been affecting you,
using the shm_ignore_files feature to exclude scripts with such code from
the shm cache should work around the issue, and those scripts will still be
accelerated by the file cache. For class initialisers, moving the
initialisation to the constructor would also be a workaround, and not
require the script to be excluded from the shm cache.

nick



------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts:

  • » [phpa] static non-empty array issue