PHP  
 PHP_HEAD
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:   
include 'server.inc';
3:   
$host curl_cli_server_start();
4:
5:   echo 
'*** Testing curl copy handle with simple 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:   
$copy curl_copy_handle($ch);
17:   
curl_close($ch);
18:  
19:   
$curl_content curl_exec($copy);
20:   
curl_close($copy);
21:
22:   
var_dump$curl_content );
23:
?>
24:
===DONE===
25:

Report

==8977== Invalid read of size 1
==8977==    at 0x4C290D4: __GI_strlen (mc_replace_strmem.c:405)
==8977==    by 0xD1D4175: strdup (in /lib64/libc-2.12.so)
==8977==    by 0x80B61B6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x80BB4E1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x80C5899: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x698C1B: zif_curl_copy_handle (interface.c:1976)
==8977==    by 0xEC4CB9: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8977==    by 0xED079A: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2595)
==8977==    by 0xEC2745: execute_ex (zend_vm_execute.h:363)
==8977==    by 0xEC32E8: zend_execute (zend_vm_execute.h:388)
==8977==    by 0xE58480: zend_execute_scripts (zend.c:1330)
==8977==    by 0xD79282: php_execute_script (main.c:2549)
==8977==  Address 0x15422245 is 0 bytes after a block of size 37 alloc'd
==8977==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8977==    by 0x80B898D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x80C5C01: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x69D0D0: _php_curl_setopt (interface.c:2692)
==8977==    by 0x69E511: zif_curl_setopt (interface.c:2875)
==8977==    by 0xEC4CB9: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8977==    by 0xED079A: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2595)
==8977==    by 0xEC2745: execute_ex (zend_vm_execute.h:363)
==8977==    by 0xEC32E8: zend_execute (zend_vm_execute.h:388)
==8977==    by 0xE58480: zend_execute_scripts (zend.c:1330)
==8977==    by 0xD79282: php_execute_script (main.c:2549)
==8977==    by 0x100ACEE: do_cli (php_cli.c:994)
==8977== 
==8977== Invalid read of size 1
==8977==    at 0x4C29E31: memcpy (mc_replace_strmem.c:883)
==8977==    by 0x80B61B6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x80BB4E1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x80C5899: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x698C1B: zif_curl_copy_handle (interface.c:1976)
==8977==    by 0xEC4CB9: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8977==    by 0xED079A: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2595)
==8977==    by 0xEC2745: execute_ex (zend_vm_execute.h:363)
==8977==    by 0xEC32E8: zend_execute (zend_vm_execute.h:388)
==8977==    by 0xE58480: zend_execute_scripts (zend.c:1330)
==8977==    by 0xD79282: php_execute_script (main.c:2549)
==8977==    by 0x100ACEE: do_cli (php_cli.c:994)
==8977==  Address 0x15422245 is 0 bytes after a block of size 37 alloc'd
==8977==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8977==    by 0x80B898D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x80C5C01: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==8977==    by 0x69D0D0: _php_curl_setopt (interface.c:2692)
==8977==    by 0x69E511: zif_curl_setopt (interface.c:2875)
==8977==    by 0xEC4CB9: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8977==    by 0xED079A: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2595)
==8977==    by 0xEC2745: execute_ex (zend_vm_execute.h:363)
==8977==    by 0xEC32E8: zend_execute (zend_vm_execute.h:388)
==8977==    by 0xE58480: zend_execute_scripts (zend.c:1330)
==8977==    by 0xD79282: php_execute_script (main.c:2549)
==8977==    by 0x100ACEE: do_cli (php_cli.c:994)
==8977== 

 

Generated at Tue, 22 Jul 2014 01:33:26 +0000 (11 hours ago)

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