At present, when curl_setopt() is called with an option that requires the
creation of a curl_slist, we simply push the new curl_slist onto a list to be
freed when the curl handle is freed. This avoids a memory leak, but means that
repeated calls to curl_setopt() on the same handle with the same option wastes
previously allocated memory on curl_slist structs that will no longer be read.
This commit changes the zend_llist that was previously used to track the lists
to a HashTable keyed by the option number, which means that we can simply
update the hash table each time curl_setopt() is called.
Fixes bug #65458 (curl memory leak).
When CLI was not built but only CGI binary, then a sequence of
$ ./buildconf
$ ./configure --prefix=/usr/local/phpcgi --disable-cli
$ make -j8
$ sudo rm -rf /usr/local/phpcgi
$ sudo make install
results in the following error:
/bin/bash /srv/smb/php-src.test/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /srv/smb/php-src.test/modules
Installing shared extensions: /usr/local/phpcgi/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CGI binary: /usr/local/phpcgi/bin/
cp: cannot create regular file `/usr/local/phpcgi/bin/#INST@28245#': No such file or directory
make: *** [install-cgi] Fehler 1
The solution is to create the binary directory before copying the
CGI binary as e.g. CLI does.
Signed-off-by: Oliver Metz <oliver.metz@gmx.de>
[extensive commit message]
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
The issue was actually because a lack of space before a "/" marking the tag
as empty. This was being swallowed in the rule for unquoted values. Fixed
by making that rule exclude quotes (as per spec anyway).