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_005.phpt ('Test curl_copy_handle() after exec() with POST')

Script

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

Report

==7586== Invalid read of size 1
==7586==    at 0x4C29914: __GI_strlen (vg_replace_strmem.c:413)
==7586==    by 0xD1DCE85: strdup (in /lib64/libc-2.12.so)
==7586==    by 0x80BC1C6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x80C14F1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x80CB8B9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x69DFB7: zif_curl_copy_handle (interface.c:2008)
==7586==    by 0xEB965D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==7586==    by 0xEC3797: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2336)
==7586==    by 0xEB72AC: execute_ex (zend_vm_execute.h:363)
==7586==    by 0xEB7E3E: zend_execute (zend_vm_execute.h:388)
==7586==    by 0xE5438C: zend_execute_scripts (zend.c:1327)
==7586==    by 0xD7708E: php_execute_script (main.c:2525)
==7586==  Address 0x153c5a45 is 0 bytes after a block of size 37 alloc'd
==7586==    at 0x4C2824A: malloc (vg_replace_malloc.c:296)
==7586==    by 0x80BE99D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x80CBC21: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x6A2511: _php_curl_setopt (interface.c:2723)
==7586==    by 0x6A3952: zif_curl_setopt (interface.c:2907)
==7586==    by 0xEB965D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==7586==    by 0xEC3797: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2336)
==7586==    by 0xEB72AC: execute_ex (zend_vm_execute.h:363)
==7586==    by 0xEB7E3E: zend_execute (zend_vm_execute.h:388)
==7586==    by 0xE5438C: zend_execute_scripts (zend.c:1327)
==7586==    by 0xD7708E: php_execute_script (main.c:2525)
==7586==    by 0x103D675: do_cli (php_cli.c:994)
==7586== 
==7586== Invalid read of size 2
==7586==    at 0x4C2AB60: memcpy (vg_replace_strmem.c:916)
==7586==    by 0x80BC1C6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x80C14F1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x80CB8B9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x69DFB7: zif_curl_copy_handle (interface.c:2008)
==7586==    by 0xEB965D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==7586==    by 0xEC3797: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2336)
==7586==    by 0xEB72AC: execute_ex (zend_vm_execute.h:363)
==7586==    by 0xEB7E3E: zend_execute (zend_vm_execute.h:388)
==7586==    by 0xE5438C: zend_execute_scripts (zend.c:1327)
==7586==    by 0xD7708E: php_execute_script (main.c:2525)
==7586==    by 0x103D675: do_cli (php_cli.c:994)
==7586==  Address 0x153c5a44 is 36 bytes inside a block of size 37 alloc'd
==7586==    at 0x4C2824A: malloc (vg_replace_malloc.c:296)
==7586==    by 0x80BE99D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x80CBC21: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==7586==    by 0x6A2511: _php_curl_setopt (interface.c:2723)
==7586==    by 0x6A3952: zif_curl_setopt (interface.c:2907)
==7586==    by 0xEB965D: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==7586==    by 0xEC3797: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2336)
==7586==    by 0xEB72AC: execute_ex (zend_vm_execute.h:363)
==7586==    by 0xEB7E3E: zend_execute (zend_vm_execute.h:388)
==7586==    by 0xE5438C: zend_execute_scripts (zend.c:1327)
==7586==    by 0xD7708E: php_execute_script (main.c:2525)
==7586==    by 0x103D675: do_cli (php_cli.c:994)
==7586== 

 

Generated at Sat, 18 Apr 2015 12:48:18 +0000 (7 days ago)

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