Bug #69135 [NEW]: finfo_file memory leak

From: Date: Fri, 27 Feb 2015 10:12:07 +0000
Subject: Bug #69135 [NEW]: finfo_file memory leak
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190984@lists.php.net to get a copy of this message
From:             zeke at cs-cart dot com
Operating system: ubuntu
PHP version:      5.6.6
Package:          Filesystem function related
Bug Type:         Bug
Bug description:finfo_file memory leak

Description:
------------
finfo_file fails with "allowed memory size of nnn bytes exhausted" on
some file types. In my case it's csv, which you can download here
https://www.dropbox.com/s/oivtic8g4r9tb20/products_general_11052014.csv?dl=0

The problem reproduces approximately since 5.5.14 to the latest 5.6.6.

Test script:
---------------
<?php

$f = finfo_open(FILEINFO_MIME);
finfo_file($f, './products_general_11052014.csv');

echo('ok');

Expected result:
----------------
"ok" should be output

Actual result:
--------------
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 4294947908 bytes) in test.php on line 4


-- 
Edit bug report at https://bugs.php.net/bug.php?id=69135&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69135&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69135&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69135&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69135&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69135&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69135&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69135&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69135&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69135&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69135&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69135&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69135&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69135&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69135&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69135&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69135&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69135&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69135&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69135&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69135&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#190984) next »