Req #72612 [Asn->Csd]: libxmlrc uses system malloc instead of PHP alloc routines

From: Date: Wed, 19 Oct 2016 12:47:01 +0000
Subject: Req #72612 [Asn->Csd]: libxmlrc uses system malloc instead of PHP alloc routines
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204917@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72612&edit=1

 ID:                 72612
 Updated by:         krakjoe@php.net
 Reported by:        stas@php.net
 Summary:            libxmlrc uses system malloc instead of PHP alloc
                     routines
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            XMLRPC-EPI related
 Operating System:   *
 PHP Version:        7.1.0alpha3
 Assigned To:        krakjoe
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2016-10-19 06:00:35] 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-07-17 23:58:46] 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. 



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=72612&edit=1


Thread (3 messages)

« previous php.bugs (#204917) next »