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

==16729== Invalid read of size 1
==16729==    at 0x4C290D4: __GI_strlen (mc_replace_strmem.c:405)
==16729==    by 0xA673E85: strdup (in /lib64/libc-2.12.so)
==16729==    by 0x7E5F1B6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x7E644E1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x7E6E899: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x6F6330: zif_curl_copy_handle (interface.c:1904)
==16729==    by 0x10AA134: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:593)
==16729==    by 0x10A78EE: execute_ex (zend_vm_execute.h:352)
==16729==    by 0x10A859A: zend_execute (zend_vm_execute.h:381)
==16729==    by 0xFFB390: zend_execute_scripts (zend.c:1290)
==16729==    by 0xEFCD74: php_execute_script (main.c:2560)
==16729==    by 0x11FDB1D: do_cli (php_cli.c:978)
==16729==  Address 0x11e0b925 is 0 bytes after a block of size 37 alloc'd
==16729==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==16729==    by 0x7E6198D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x7E6EC01: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x6FAFE2: _php_curl_setopt (interface.c:2585)
==16729==    by 0x6FC274: zif_curl_setopt (interface.c:2761)
==16729==    by 0x10AA134: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:593)
==16729==    by 0x10A78EE: execute_ex (zend_vm_execute.h:352)
==16729==    by 0x10A859A: zend_execute (zend_vm_execute.h:381)
==16729==    by 0xFFB390: zend_execute_scripts (zend.c:1290)
==16729==    by 0xEFCD74: php_execute_script (main.c:2560)
==16729==    by 0x11FDB1D: do_cli (php_cli.c:978)
==16729==    by 0x11FF599: main (php_cli.c:1356)
==16729== 
==16729== Invalid read of size 1
==16729==    at 0x4C29E31: memcpy (mc_replace_strmem.c:883)
==16729==    by 0x7E5F1B6: ??? (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x7E644E1: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x7E6E899: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x6F6330: zif_curl_copy_handle (interface.c:1904)
==16729==    by 0x10AA134: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:593)
==16729==    by 0x10A78EE: execute_ex (zend_vm_execute.h:352)
==16729==    by 0x10A859A: zend_execute (zend_vm_execute.h:381)
==16729==    by 0xFFB390: zend_execute_scripts (zend.c:1290)
==16729==    by 0xEFCD74: php_execute_script (main.c:2560)
==16729==    by 0x11FDB1D: do_cli (php_cli.c:978)
==16729==    by 0x11FF599: main (php_cli.c:1356)
==16729==  Address 0x11e0b925 is 0 bytes after a block of size 37 alloc'd
==16729==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==16729==    by 0x7E6198D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x7E6EC01: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==16729==    by 0x6FAFE2: _php_curl_setopt (interface.c:2585)
==16729==    by 0x6FC274: zif_curl_setopt (interface.c:2761)
==16729==    by 0x10AA134: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:593)
==16729==    by 0x10A78EE: execute_ex (zend_vm_execute.h:352)
==16729==    by 0x10A859A: zend_execute (zend_vm_execute.h:381)
==16729==    by 0xFFB390: zend_execute_scripts (zend.c:1290)
==16729==    by 0xEFCD74: php_execute_script (main.c:2560)
==16729==    by 0x11FDB1D: do_cli (php_cli.c:978)
==16729==    by 0x11FF599: main (php_cli.c:1356)
==16729== 

 

Generated at Sat, 27 Sep 2014 16:43:25 +0000 (4 days ago)

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