Package: php5-syck
Version: 0.55+svn270-1
Severity: grave
Justification: renders package unusable


When trying to to syck_dump() a simple data structure, PHPs memory_limit is hit
immediately. The data being dumped doesn't warrant hitting the memory limit and
the limit is already at 128M on my system.

I've tested the same code with the syck version from
http://pecl.php.net/package/syck and it works.

$ cat test
a:2:{s:7:"traffic";a:1:{i:2007;a:1:{i:7;a:1:{s:2:"01";a:1:{s:2:"07";i:463293;}}}}s:4:"sha1";a:1:{s:40:"56b44b92aae1d66eefd1ed1d8c55d627421b6e26";b:1;}}
$ php -r '$a = unserialize(file_get_contents("test")); var_dump($a); 
syck_dump($a);'
array(2) {
  ["traffic"]=>
  array(1) {
    [2007]=>
    array(1) {
      [7]=>
      array(1) {
        ["01"]=>
        array(1) {
          ["07"]=>
          int(463293)
        }
      }
    }
  }
  ["sha1"]=>
  array(1) {
    ["56b44b92aae1d66eefd1ed1d8c55d627421b6e26"]=>
    bool(true)
  }
}

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to 
allocate 176001744 bytes) in Command line code on line 1

Call Stack:
    0.0001      51572   1. {main}() Command line code:0
    0.0003      54036   2. syck_dump() Command line code:1

[EMAIL PROTECTED]:~/src/php$ sudo dpkg --purge php5-syck
(Reading database ... 39871 files and directories currently installed.)
Removing php5-syck ...
Purging configuration files for php5-syck ...
[EMAIL PROTECTED]:~/src/php$ sudo pecl install syck-beta
downloading syck-0.9.2.tgz ...
Starting to download syck-0.9.2.tgz (11,339 bytes)
.....done: 11,339 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/syck-0.9.2
[...]
Build process completed successfully
Installing '/usr/lib/php5/20060613+lfs/syck.so'
install ok: channel://pecl.php.net/syck-0.9.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=syck.so" to php.ini

[EMAIL PROTECTED]:~/src/php$ php -d extension=syck.so -r '$a = 
unserialize(file_get_contents("test")); var_dump($a); var_dump(syck_dump($a));'
array(2) {
  ["traffic"]=>
  array(1) {
    [2007]=>
    array(1) {
      [7]=>
      array(1) {
        ["01"]=>
        array(1) {
          ["07"]=>
          int(463293)
        }
      }
    }
  }
  ["sha1"]=>
  array(1) {
    ["56b44b92aae1d66eefd1ed1d8c55d627421b6e26"]=>
    bool(true)
  }
}
string(159) "--- %YAML:1.0
? "traffic"
:
  ? 2007
  :
    ? 7
    :
      ? "01"
      : {"07": 463293}

? "sha1"
: {"56b44b92aae1d66eefd1ed1d8c55d627421b6e26": true}

"
sincerely,
- Markus

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (800, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.6-vs2.2.0.1-netdoktor2-nd-vserv-bigmem4 (SMP w/4 CPU cores)
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5-syck depends on:
ii  libapache2-mod-php5 [phpapi-2 5.2.4-2+b1 server-side, HTML-embedded scripti
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  php5-cli [phpapi-20060613+lfs 5.2.4-2+b1 command-line interpreter for the p

php5-syck recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to