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: $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); 4: 5: echo '*** Test curl_copy_handle() after exec() with POST ***' . "\n"; 6: 7: $url = "{$host}/get.php?test=getpost"; 8: $ch = curl_init(); 9: 10: ob_start(); // start output buffering 11: curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 12: curl_setopt($ch, CURLOPT_POST, 1); 13: curl_setopt($ch, CURLOPT_POSTFIELDS, "Hello=World&Foo=Bar&Person=John%20Doe"); 14: curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use 15: 16: 17: $curl_content = curl_exec($ch); 18: $copy = curl_copy_handle($ch); 19: curl_close($ch); 20: 21: $curl_content_copy = curl_exec($copy); 22: curl_close($copy); 23: 24: var_dump( $curl_content_copy ); 25: ?> 26: ===DONE=== 27:
Report
==18571== Invalid read of size 1
==18571== at 0x4C28EE4: __GI_strlen (mc_replace_strmem.c:400)
==18571== by 0xD17C035: strdup (in /lib64/libc-2.12.so)
==18571== by 0x8352F16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x8358261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x83625F9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x665292: zif_curl_copy_handle (interface.c:1967)
==18571== by 0xE7141B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==18571== by 0xE7B42B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==18571== by 0xE6F058: execute_ex (zend_vm_execute.h:356)
==18571== by 0xE6FBEA: zend_execute (zend_vm_execute.h:381)
==18571== by 0xE0D032: zend_execute_scripts (zend.c:1316)
==18571== by 0xD30A33: php_execute_script (main.c:2481)
==18571== Address 0x153492e5 is 0 bytes after a block of size 37 alloc'd
==18571== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==18571== by 0x835570D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x8362961: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x66903B: _php_curl_setopt (interface.c:2667)
==18571== by 0x66A4B9: zif_curl_setopt (interface.c:2863)
==18571== by 0xE7141B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==18571== by 0xE7B42B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==18571== by 0xE6F058: execute_ex (zend_vm_execute.h:356)
==18571== by 0xE6FBEA: zend_execute (zend_vm_execute.h:381)
==18571== by 0xE0D032: zend_execute_scripts (zend.c:1316)
==18571== by 0xD30A33: php_execute_script (main.c:2481)
==18571== by 0xFF1A24: do_cli (php_cli.c:993)
==18571==
==18571== Invalid read of size 1
==18571== at 0x4C29C41: memcpy (mc_replace_strmem.c:878)
==18571== by 0x8352F16: ??? (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x8358261: Curl_dupset (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x83625F9: curl_easy_duphandle (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x665292: zif_curl_copy_handle (interface.c:1967)
==18571== by 0xE7141B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==18571== by 0xE7B42B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==18571== by 0xE6F058: execute_ex (zend_vm_execute.h:356)
==18571== by 0xE6FBEA: zend_execute (zend_vm_execute.h:381)
==18571== by 0xE0D032: zend_execute_scripts (zend.c:1316)
==18571== by 0xD30A33: php_execute_script (main.c:2481)
==18571== by 0xFF1A24: do_cli (php_cli.c:993)
==18571== Address 0x153492e5 is 0 bytes after a block of size 37 alloc'd
==18571== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==18571== by 0x835570D: Curl_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x8362961: curl_easy_setopt (in /usr/lib64/libcurl.so.4.1.1)
==18571== by 0x66903B: _php_curl_setopt (interface.c:2667)
==18571== by 0x66A4B9: zif_curl_setopt (interface.c:2863)
==18571== by 0xE7141B: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:543)
==18571== by 0xE7B42B: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2322)
==18571== by 0xE6F058: execute_ex (zend_vm_execute.h:356)
==18571== by 0xE6FBEA: zend_execute (zend_vm_execute.h:381)
==18571== by 0xE0D032: zend_execute_scripts (zend.c:1316)
==18571== by 0xD30A33: php_execute_script (main.c:2481)
==18571== by 0xFF1A24: do_cli (php_cli.c:993)
==18571==
Generated at Thu, 23 May 2013 18:18:24 +0000 (13 hours ago)
|