php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72576 Memory leak or potential segfaul in LibXML
Submitted: 2016-07-11 12:23 UTC Modified: 2018-06-24 04:25 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: eugen dot mayer at kontextwork dot de Assigned: cmb (profile)
Status: No Feedback Package: XML related
PHP Version: 7.0.8 OS: Linux, Debian Jessie
Private report: No CVE-ID: None
 [2016-07-11 12:23 UTC] eugen dot mayer at kontextwork dot de
Description:
------------
When using this Jessie-Setup with PHP 7.0.8, disabling all extensions leaving it with:

php -m
[PHP Modules]
Core
date
filter
hash
libxml
openssl
pcntl
pcre
Reflection
session
SPL
standard
zlib

Using valgrind, i get a memory leak https://gist.github.com/EugenMayer/bdfe97f551caf6923ba5b911b7959476

Even though the linked repo has memcached it its name, its not memcached related. I was hunting a memcached igbinary bug, but this crossed our setup recently. 

Test script:
---------------
git clone https://github.com/EugenMayer/deb-surg-org-tests
cd deb-surg-org-tests/memcached
docker-compose build
docker run -i -t eugenmayer/deb-surg-org-tests:memcached valgrind --leak-check=full --leak-check=full --show-leak-kinds=all /usr/bin/php7.0 -S localhost:8085
CTRL+C

Expected result:
----------------
Not having a Segfault, like running the same with php5.5

git clone https://github.com/EugenMayer/deb-surg-org-tests
cd deb-surg-org-tests/memcached
docker-compose build
docker run -i -t eugenmayer/deb-surg-org-tests:memcached valgrind --leak-check=full --leak-check=full --show-leak-kinds=all /usr/bin/php5.5 -S localhost:8085
CTRL+C

valgrind --leak-check=full /usr/bin/php7.0 -S localhost:8085
==18== Memcheck, a memory error detector
==18== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==18== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==18== Command: /usr/bin/php7.0 -S localhost:8085
==18==
PHP 7.0.8-2+0~20160628130014.3+jessie~1.gbp5338fb Development Server started at Mon Jul 11 09:47:52 2016
Listening on http://localhost:8085
Document root is /etc/php/7.0/cli/conf.d
Press Ctrl-C to quit.

Actual result:
--------------
https://gist.github.com/EugenMayer/bdfe97f551caf6923ba5b911b7959476

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-13 17:17 UTC] cmb@php.net
-Package: PECL +Package: XML related
 [2018-03-31 12:12 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2018-03-31 12:12 UTC] cmb@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

BTW: the valgrind report shows memory leaks, but I cannot see
anything regarding a segfault.
 [2018-06-24 04:25 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC