PHP  
 PHP_5_4
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/curl/tests/curl_copy_handle_basic_005.phpt ('Test curl_copy_handle() after exec() with POST')

Script

1: <?php
2:
3:   $host 
getenv('PHP_CURL_HTTP_REMOTE_SERVER');
4:
5:   echo 
'*** Test curl_copy_handle() after exec() with POST ***' "\n";
6:
7:   
$url "{$host}/get.php?test=getpost";
8:   
$ch curl_init();
9:
10:   
ob_start(); // start output buffering
11:   
curl_setopt($chCURLOPT_RETURNTRANSFER1);
12:   
curl_setopt($chCURLOPT_POST1);
13:   
curl_setopt($chCURLOPT_POSTFIELDS"Hello=World&Foo=Bar&Person=John%20Doe");
14:   
curl_setopt($chCURLOPT_URL$url); //set the url we want to use
15:   
16:   
17:   
$curl_content curl_exec($ch);
18:   
$copy curl_copy_handle($ch);
19:   
curl_close($ch);
20:   
21:   
$curl_content_copy curl_exec($copy);
22:   
curl_close($copy);
23:
24:   
var_dump$curl_content_copy );
25:
?>
26:
===DONE===
27:

Report

==30901== Invalid read of size 1
==30901==    at 0x4C290D4: __GI_strlen (mc_replace_strmem.c:405)
==30901==    by 0xCFC7165: strdup (in /lib64/libc-2.12.so)
==30901==    by 0x80B5F16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x80BB261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x80C5619: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x6527B5: zif_curl_copy_handle (interface.c:1613)
==30901==    by 0xDE095B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==30901==    by 0xDEAAFB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==30901==    by 0xDDEAB7: execute (zend_vm_execute.h:410)
==30901==    by 0xD82A54: zend_execute_scripts (zend.c:1315)
==30901==    by 0xCB4DE9: php_execute_script (main.c:2502)
==30901==    by 0xF50AD0: do_cli (php_cli.c:989)
==30901==  Address 0x14e16b65 is 0 bytes after a block of size 37 alloc'd
==30901==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==30901==    by 0x80B870D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x80C5981: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x656394: _php_curl_setopt (interface.c:2146)
==30901==    by 0x6572AB: zif_curl_setopt (interface.c:2264)
==30901==    by 0xDE095B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==30901==    by 0xDEAAFB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==30901==    by 0xDDEAB7: execute (zend_vm_execute.h:410)
==30901==    by 0xD82A54: zend_execute_scripts (zend.c:1315)
==30901==    by 0xCB4DE9: php_execute_script (main.c:2502)
==30901==    by 0xF50AD0: do_cli (php_cli.c:989)
==30901==    by 0xF5210D: main (php_cli.c:1365)
==30901== 
==30901== Invalid read of size 1
==30901==    at 0x4C29E31: memcpy (mc_replace_strmem.c:883)
==30901==    by 0x80B5F16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x80BB261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x80C5619: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x6527B5: zif_curl_copy_handle (interface.c:1613)
==30901==    by 0xDE095B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==30901==    by 0xDEAAFB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==30901==    by 0xDDEAB7: execute (zend_vm_execute.h:410)
==30901==    by 0xD82A54: zend_execute_scripts (zend.c:1315)
==30901==    by 0xCB4DE9: php_execute_script (main.c:2502)
==30901==    by 0xF50AD0: do_cli (php_cli.c:989)
==30901==    by 0xF5210D: main (php_cli.c:1365)
==30901==  Address 0x14e16b65 is 0 bytes after a block of size 37 alloc'd
==30901==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==30901==    by 0x80B870D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x80C5981: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==30901==    by 0x656394: _php_curl_setopt (interface.c:2146)
==30901==    by 0x6572AB: zif_curl_setopt (interface.c:2264)
==30901==    by 0xDE095B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==30901==    by 0xDEAAFB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==30901==    by 0xDDEAB7: execute (zend_vm_execute.h:410)
==30901==    by 0xD82A54: zend_execute_scripts (zend.c:1315)
==30901==    by 0xCB4DE9: php_execute_script (main.c:2502)
==30901==    by 0xF50AD0: do_cli (php_cli.c:989)
==30901==    by 0xF5210D: main (php_cli.c:1365)
==30901== 

 

Generated at Sun, 20 Apr 2014 03:52:23 +0000 (3 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.