Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes bug#71504 (php5.6 version of php7.0 bug#71317) #1751

wants to merge 3 commits into from


4 participants
Copy link

commented Feb 3, 2016

As reflected in bug report #71504 tar files with duplicate filenames cause a memoryleak, silently ignoring subsequent entry contrary to the behavour of tar which silently overwrite previous entries.

This pr mitigates the memory leak in the same way as pr #1748 does for php 7.0

@zghosts zghosts changed the title fixes bug#71504 and (php5.6 version of php7.0 bug#71317) fixes bug#71504 (php5.6 version of php7.0 bug#71317) Feb 3, 2016

$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/HTML_CSS-1.5.4.tgz');
try {
$tar = new PharData($fname);
$tar->extractTo(__DIR__ . '/files/ff');

This comment has been minimized.

Copy link

staabm Feb 3, 2016


this files/folder should be cleaned up afterwards?

This comment has been minimized.

Copy link

zghosts Feb 3, 2016

Author Contributor

True, however extracting the files is not needed to prove the memory leak so I removed the extraction of files from the test.

@jpauli jpauli added the Bugfix label Feb 6, 2016

add extra test verifying that the second file is actually being extra…
…cted instead of the first file, in line the behaviour of tar for amended files

@nikic nikic closed this Feb 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.