php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72612 libxmlrc uses system malloc instead of PHP alloc routines
Submitted: 2016-07-17 23:58 UTC Modified: 2016-10-19 12:47 UTC
From: stas@php.net Assigned: krakjoe (profile)
Status: Closed Package: XMLRPC-EPI related
PHP Version: 7.1.0alpha3 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stas@php.net
New email:
PHP Version: OS:

 

 [2016-07-17 23:58 UTC] stas@php.net
Description:
------------
libxmlrc uses system malloc to create XML strings and other data. Since these allocations, with big requests, can grow large, it would be better to patch it to use PHP's memory allocation routines. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-19 05:26 UTC] krakjoe@php.net
-Assigned To: +Assigned To: krakjoe
 [2016-10-19 06:00 UTC] krakjoe@php.net
Job done, just finding out how far back in 7 I can merge ...

Noticed a scary thing while working on that: libxmlrpc as bundled is not re-entrant, breaking thread safety: At least the queue component of the library uses static globals, and will definitely cause problems when two threads concurrently sort a queue ... I wasn't reviewing for this reason, so there may be other components doing the same kind of thing, I just happened to spot that one.

That should either be fixed (doable), or if we are reluctant to touch such "mature" code, should be documented as unsafe in ZTS.

Also noticed that there is a lot of string duplication going on, maybe someone could look at using zend_string in libxmlrpc at some future time.

I'm not sure how much use this extension really gets, so not sure how important any of this is.
 [2016-10-19 12:47 UTC] krakjoe@php.net
-Status: Assigned +Status: Closed
 [2016-10-19 12:47 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Merged into master for now, we are not sure how much testing it will get, so are reluctant to go further back than that.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 17:01:30 2024 UTC