PHP  
 PHP_5_5
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_002.phpt ('Test curl_copy_handle() with simple POST')

Script

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

Report

==15870== Invalid read of size 1
==15870==    at 0x4C28EE4: __GI_strlen (mc_replace_strmem.c:400)
==15870==    by 0xD17C035: strdup (in /lib64/libc-2.12.so)
==15870==    by 0x8352F16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x8358261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x83625F9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x6652E2: zif_curl_copy_handle (interface.c:1967)
==15870==    by 0xE71B9B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==15870==    by 0xE7BBAB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==15870==    by 0xE6F7D8: execute_ex (zend_vm_execute.h:356)
==15870==    by 0xE7036A: zend_execute (zend_vm_execute.h:381)
==15870==    by 0xE0D7B2: zend_execute_scripts (zend.c:1316)
==15870==    by 0xD312C7: php_execute_script (main.c:2481)
==15870==  Address 0x15348f25 is 0 bytes after a block of size 37 alloc'd
==15870==    at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==15870==    by 0x835570D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x8362961: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x66908B: _php_curl_setopt (interface.c:2667)
==15870==    by 0x66A509: zif_curl_setopt (interface.c:2863)
==15870==    by 0xE71B9B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==15870==    by 0xE7BBAB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==15870==    by 0xE6F7D8: execute_ex (zend_vm_execute.h:356)
==15870==    by 0xE7036A: zend_execute (zend_vm_execute.h:381)
==15870==    by 0xE0D7B2: zend_execute_scripts (zend.c:1316)
==15870==    by 0xD312C7: php_execute_script (main.c:2481)
==15870==    by 0xFF21A4: do_cli (php_cli.c:993)
==15870== 
==15870== Invalid read of size 1
==15870==    at 0x4C29C41: memcpy (mc_replace_strmem.c:878)
==15870==    by 0x8352F16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x8358261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x83625F9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x6652E2: zif_curl_copy_handle (interface.c:1967)
==15870==    by 0xE71B9B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==15870==    by 0xE7BBAB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==15870==    by 0xE6F7D8: execute_ex (zend_vm_execute.h:356)
==15870==    by 0xE7036A: zend_execute (zend_vm_execute.h:381)
==15870==    by 0xE0D7B2: zend_execute_scripts (zend.c:1316)
==15870==    by 0xD312C7: php_execute_script (main.c:2481)
==15870==    by 0xFF21A4: do_cli (php_cli.c:993)
==15870==  Address 0x15348f25 is 0 bytes after a block of size 37 alloc'd
==15870==    at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==15870==    by 0x835570D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x8362961: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==15870==    by 0x66908B: _php_curl_setopt (interface.c:2667)
==15870==    by 0x66A509: zif_curl_setopt (interface.c:2863)
==15870==    by 0xE71B9B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==15870==    by 0xE7BBAB: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==15870==    by 0xE6F7D8: execute_ex (zend_vm_execute.h:356)
==15870==    by 0xE7036A: zend_execute (zend_vm_execute.h:381)
==15870==    by 0xE0D7B2: zend_execute_scripts (zend.c:1316)
==15870==    by 0xD312C7: php_execute_script (main.c:2481)
==15870==    by 0xFF21A4: do_cli (php_cli.c:993)
==15870== 

 

Generated at Sat, 08 Jun 2013 10:22:27 +0000 (11 days ago)

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