php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36457 glob("*.txt", 50) segment fault on linux
Submitted: 2006-02-20 04:18 UTC Modified: 2006-02-28 01:00 UTC
From: sqchen at citiz dot net Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.1.2 OS: redhat 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sqchen at citiz dot net
New email:
PHP Version: OS:

 

 [2006-02-20 04:18 UTC] sqchen at citiz dot net
Description:
------------
glob("*.txt", 50) segment fault on linux

Reproduce code:
---------------
glob("*.txt", 50) ans also when the second parameter is 48 or 64 or some others 

Actual result:
--------------
segfault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-20 10:39 UTC] bjori@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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.
 [2006-02-20 15:17 UTC] judas dot iscariote at gmail dot conm
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1077895360 (LWP 9385)]
0x40343c10 in strncpy () from /lib/tls/libc.so.6
(gdb) bt
#0  0x40343c10 in strncpy () from /lib/tls/libc.so.6
#1  0x080d7e56 in zif_glob (ht=-1073750192, return_value=0x8372494, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /usr/src/debug/php-5.1.2/ext/standard/dir.c:424
#2  0x0818964c in zend_do_fcall_common_helper_SPEC (execute_data=0xbffff020) at zend_vm_execute.h:192
#3  0x081d9088 in execute (op_array=0x8372b04) at zend_vm_execute.h:92
#4  0x08161b7f in zend_eval_string (str=0xbffff58b "glob(\"*.txt\", 50);", retval_ptr=0x0,
    string_name=0xbfffdf50 "p?-@(\n\032@8") at /usr/src/debug/php-5.1.2/Zend/zend_execute_API.c:1091
#5  0x08161ccf in zend_eval_string_ex (str=0xbfffdf50 "p?-@(\n\032@8", retval_ptr=0xbfffdf50,
    string_name=0xbfffdf50 "p?-@(\n\032@8", handle_exceptions=1) at /usr/src/debug/php-5.1.2/Zend/zend_execute_API.c:1125
#6  0x081da780 in main (argc=3, argv=0xbffff3c4) at /usr/src/debug/php-5.1.2/sapi/cli/php_cli.c:1129

PHP 5.1.3-dev (cli) (built: Feb 16 2006 17:24:42)
 [2006-02-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC