Skip to content

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 7, 2018

Since we allow ext/xmlrpc to be built against a system libxmlrpc(-epi),
we must not efree memory which has been allocated via malloc. To
distinguish bundled and system libxmlrpc(-epi) we introduce the macro
HAVE_XMLRPC_BUNDLED (analogous to how it is done by ext/gd). We
deliberately keep the ugly #ifdefs, instead of tucking them away in
an XMLRPC_FREE() macro, to not forget that it is a bad idea to fork
and bundle a library, but to also allow building against an unpatched
system lib.

Since we allow ext/xmlrpc to be built against a system libxmlrpc(-epi),
we must not `efree` memory which has been allocated via `malloc`.  To
distinguish bundled and system libxmlrpc(-epi) we introduce the macro
`HAVE_XMLRPC_BUNDLED` (analogous to how it is done by ext/gd).  We
deliberately keep the ugly `#ifdef`s, instead of tucking them away in
an `XMLRPC_FREE()` macro, to not forget that it is a bad idea to fork
and bundle a library, but to also allow building against an unpatched
system lib.
@cmb69
Copy link
Member Author

cmb69 commented Oct 7, 2018

@oerdnj This is supposed to get rid of the Revert "libxmlrc uses system malloc instead of PHP alloc routines" patch. Can you please confirm?

Other tests using `xmlrpc_encode_request()` already exhibit the issue.
@php-pulls
Copy link

Comment on behalf of petk at php.net:

Labelling

@php-pulls php-pulls added the Bug label Oct 8, 2018
@cmb69
Copy link
Member Author

cmb69 commented Oct 16, 2018

Unless there are objections, I'm going to merge this on the next weekend.

@php-pulls
Copy link

Comment on behalf of cmb at php.net:

Applied via 502b187.

@php-pulls php-pulls closed this Oct 21, 2018
@cmb69 cmb69 deleted the fix-75282 branch October 21, 2018 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants