PHP  
 PHP_5_3
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

==23335== Invalid read of size 1
==23335==    at 0x4C290D4: __GI_strlen (mc_replace_strmem.c:405)
==23335==    by 0xCCC1165: strdup (in /lib64/libc-2.12.so)
==23335==    by 0x804CF16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x8052261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x805C619: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x64A371: zif_curl_copy_handle (interface.c:1609)
==23335==    by 0xDBB76C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==23335==    by 0xDC1AA3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634)
==23335==    by 0xDBA7C3: execute (zend_vm_execute.h:107)
==23335==    by 0xD6DC63: zend_execute_scripts (zend.c:1259)
==23335==    by 0xCB9C70: php_execute_script (main.c:2316)
==23335==    by 0xEB1004: main (php_cli.c:1189)
==23335==  Address 0x14e0c715 is 0 bytes after a block of size 37 alloc'd
==23335==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==23335==    by 0x804F70D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x805C981: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x64DC30: _php_curl_setopt (interface.c:2127)
==23335==    by 0x64EA89: zif_curl_setopt (interface.c:2245)
==23335==    by 0xDBB76C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==23335==    by 0xDC1AA3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634)
==23335==    by 0xDBA7C3: execute (zend_vm_execute.h:107)
==23335==    by 0xD6DC63: zend_execute_scripts (zend.c:1259)
==23335==    by 0xCB9C70: php_execute_script (main.c:2316)
==23335==    by 0xEB1004: main (php_cli.c:1189)
==23335== 
==23335== Invalid read of size 1
==23335==    at 0x4C29E31: memcpy (mc_replace_strmem.c:883)
==23335==    by 0x804CF16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x8052261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x805C619: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x64A371: zif_curl_copy_handle (interface.c:1609)
==23335==    by 0xDBB76C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==23335==    by 0xDC1AA3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634)
==23335==    by 0xDBA7C3: execute (zend_vm_execute.h:107)
==23335==    by 0xD6DC63: zend_execute_scripts (zend.c:1259)
==23335==    by 0xCB9C70: php_execute_script (main.c:2316)
==23335==    by 0xEB1004: main (php_cli.c:1189)
==23335==  Address 0x14e0c715 is 0 bytes after a block of size 37 alloc'd
==23335==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==23335==    by 0x804F70D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x805C981: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==23335==    by 0x64DC30: _php_curl_setopt (interface.c:2127)
==23335==    by 0x64EA89: zif_curl_setopt (interface.c:2245)
==23335==    by 0xDBB76C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==23335==    by 0xDC1AA3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1634)
==23335==    by 0xDBA7C3: execute (zend_vm_execute.h:107)
==23335==    by 0xD6DC63: zend_execute_scripts (zend.c:1259)
==23335==    by 0xCB9C70: php_execute_script (main.c:2316)
==23335==    by 0xEB1004: main (php_cli.c:1189)
==23335== 

 

Generated at Fri, 18 Apr 2014 07:01:42 +0000 (5 days ago)

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