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_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

==18788== Invalid read of size 1
==18788==    at 0x4C29914: __GI_strlen (vg_replace_strmem.c:413)
==18788==    by 0xCFD0E85: strdup (in /lib64/libc-2.12.so)
==18788==    by 0x80BC1C6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x80C14F1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x80CB8B9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x69FF47: zif_curl_copy_handle (interface.c:1623)
==18788==    by 0xE31203: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==18788==    by 0xE3B3A3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==18788==    by 0xE2F35F: execute (zend_vm_execute.h:410)
==18788==    by 0xDD32C4: zend_execute_scripts (zend.c:1329)
==18788==    by 0xD05099: php_execute_script (main.c:2502)
==18788==    by 0xFA1450: do_cli (php_cli.c:989)
==18788==  Address 0x14dcdef5 is 0 bytes after a block of size 37 alloc'd
==18788==    at 0x4C2824A: malloc (vg_replace_malloc.c:296)
==18788==    by 0x80BE99D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x80CBC21: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x6A3B26: _php_curl_setopt (interface.c:2156)
==18788==    by 0x6A4A3D: zif_curl_setopt (interface.c:2274)
==18788==    by 0xE31203: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==18788==    by 0xE3B3A3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==18788==    by 0xE2F35F: execute (zend_vm_execute.h:410)
==18788==    by 0xDD32C4: zend_execute_scripts (zend.c:1329)
==18788==    by 0xD05099: php_execute_script (main.c:2502)
==18788==    by 0xFA1450: do_cli (php_cli.c:989)
==18788==    by 0xFA2A8D: main (php_cli.c:1365)
==18788== 
==18788== Invalid read of size 2
==18788==    at 0x4C2AB60: memcpy (vg_replace_strmem.c:916)
==18788==    by 0x80BC1C6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x80C14F1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x80CB8B9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x69FF47: zif_curl_copy_handle (interface.c:1623)
==18788==    by 0xE31203: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==18788==    by 0xE3B3A3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==18788==    by 0xE2F35F: execute (zend_vm_execute.h:410)
==18788==    by 0xDD32C4: zend_execute_scripts (zend.c:1329)
==18788==    by 0xD05099: php_execute_script (main.c:2502)
==18788==    by 0xFA1450: do_cli (php_cli.c:989)
==18788==    by 0xFA2A8D: main (php_cli.c:1365)
==18788==  Address 0x14dcdef4 is 36 bytes inside a block of size 37 alloc'd
==18788==    at 0x4C2824A: malloc (vg_replace_malloc.c:296)
==18788==    by 0x80BE99D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x80CBC21: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18788==    by 0x6A3B26: _php_curl_setopt (interface.c:2156)
==18788==    by 0x6A4A3D: zif_curl_setopt (interface.c:2274)
==18788==    by 0xE31203: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==18788==    by 0xE3B3A3: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2233)
==18788==    by 0xE2F35F: execute (zend_vm_execute.h:410)
==18788==    by 0xDD32C4: zend_execute_scripts (zend.c:1329)
==18788==    by 0xD05099: php_execute_script (main.c:2502)
==18788==    by 0xFA1450: do_cli (php_cli.c:989)
==18788==    by 0xFA2A8D: main (php_cli.c:1365)
==18788== 

 

Generated at Sun, 17 May 2015 16:25:24 +0000 (5 days ago)

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