Bug #18036 Updated: Curl_exec segfault

From: Date: Fri, 28 Jun 2002 06:49:18 +0000
Subject: Bug #18036 Updated: Curl_exec segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12324@lists.php.net to get a copy of this message
ID: 18036 Updated by: nuitari@darklands.cx Reported By: nuitari@darklands.cx -Status: Feedback +Status: Open Bug Type: cURL related Operating System: Linux PHP Version: 4.2.1 New Comment: libcurl 7.9.8 Error was also in 7.9.7 I don't know for earlier versions. Sample php script: <? $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,"http://www.google.com"); curl_setopt ($ch, CURLOPT_POST, 1); curl_exec($ch); ?> strace info snippet: send(3, "POST / HTTP/1.1\r\nHost: www.googl"..., 193, 0) = 193 gettimeofday({1025268846, 532533}, NULL) = 0 gettimeofday({1025268846, 532555}, NULL) = 0 select(4, [3], [3], NULL, {1, 0}) = 1 (out [3], left {1, 0}) gettimeofday({1025268846, 532760}, NULL) = 0 --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ Here is the back trace: (gdb) bt #0 0x404e2016 in _IO_fread (buf=0x82bd9d9, size=1, count=20480, fp=0x0) at iofread.c:42 #1 0x0808248c in curl_read (data=0x82bd9d9 "", size=1, nmemb=20480, ctx=0x82b771c) at curl.c:350 #2 0x4031d190 in Curl_readwrite (conn=0x82b7b10, done=0xbfffdc2f "") at transfer.c:808 #3 0x4031d9ca in Transfer (conn=0x82b7b10) at transfer.c:1093 #4 0x4031ddc6 in Curl_perform (data=0x82b8380) at transfer.c:1180 #5 0x4031e176 in curl_easy_perform (curl=0x82b8380) at easy.c:245 #6 0x08083972 in zif_curl_exec (ht=1, return_value=0x82b7964, this_ptr=0x0, return_value_used=0) at curl.c:876 #7 0x08150440 in execute (op_array=0x82b3134) at ./zend_execute.c:1598 #8 0x08129cc2 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810 #9 0x08075351 in php_execute_script (primary_file=0xbffffa40) at main.c:1381 #10 0x0807335c in main (argc=2, argv=0xbffffae4) at cgi_main.c:778 #11 0x4048c627 in __libc_start_main (main=0x8072b54 <main>, argc=2, ubp_av=0xbffffae4, init=0x8070864 <_init>, fini=0x81a9030 <_fini>, rtld_fini=0x4000dcc4 <_dl_fini>, stack_end=0xbffffadc) at ../sysdeps/generic/libc-start.c:129 (gdb) frame 0 #0 0x404e2016 in _IO_fread (buf=0x82bd9d9, size=1, count=20480, fp=0x0) at iofread.c:42 42 in iofread.c (gdb) frame 1 #1 0x0808248c in curl_read (data=0x82bd9d9 "", size=1, nmemb=20480, ctx=0x82b771c) at curl.c:350 350 curl.c: No such file or directory. in curl.c (gdb) frame 7 #7 0x08150440 in execute (op_array=0x82b3134) at ./zend_execute.c:1598 1598 ./zend_execute.c: No such file or directory. in ./zend_execute.c Previous Comments: ------------------------------------------------------------------------ [2002-06-28 02:09:13] sniper@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Which version of curl libraries is your php compiled with? ------------------------------------------------------------------------ [2002-06-28 01:41:15] nuitari@darklands.cx PHP will cause a segmentation fault if CURL_POST is set to 1, but there is no CURL_POSTFIELDS set. Sorry if this has already been reported before, I tried searching for it, but might have missed it. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18036&edit=1

« previous php.bugs (#12324) next »