Professional Web Applications Themes

#26025 [Opn->Fbk]: segfault when glob() is called with GLOB_BRACE and there are no matches - PHP Development

ID: 26025 Updated by: [email]alan_kphp.net[/email] Reported By: ryan at wonko dot com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: FreeBSD 4.7-RELEASE PHP Version: 4.3.4RC2 New Comment: 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 [url]http://bugs.php.net/bugs-generating-backtrace.php[/url] 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. .. Previous Comments: ------------------------------------------------------------------------ [2003-10-29 01:41:55] ryan at ...

  1. #1

    Default #26025 [Opn->Fbk]: segfault when glob() is called with GLOB_BRACE and there are no matches

    ID: 26025
    Updated by: [email]alan_kphp.net[/email]
    Reported By: ryan at wonko dot com
    -Status: Open
    +Status: Feedback
    Bug Type: Filesystem function related
    Operating System: FreeBSD 4.7-RELEASE
    PHP Version: 4.3.4RC2
    New Comment:

    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
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url]

    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.

    ..


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-10-29 01:41:55] ryan at wonko dot com

    Description:
    ------------
    When you call glob() with the GLOB_BRACE flag set, PHP segfaults if
    there are no files or directories matching the pattern.

    I'm running Apache 2.0.47 and PHP was built with the following
    configure line:

    './configure' '--enable-versioning' '--enable-memory-limit'
    '--with-layout=GNU' '--with-zlib-dir=/usr' '--disable-all'
    '--with-regex=php' '--disable-cli' '--with-bz2=/usr' '--enable-ctype'
    '--with-dom=/usr/local' '--enable-exif' '--enable-ftp' '--with-gd'
    '--enable-gd-native-ttf' '--enable-gd-jis-conv'
    '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
    '--with-png-dir=/usr/local' '--with-xpm-dir=/usr/local'
    '--with-gettext=/usr/local' '--with-mysql=/usr/local'
    '--with-openssl-dir=/usr/local' '--with-openssl=/usr/local'
    '--enable-overload' '--with-pcre-regex=yes' '--enable-posix'
    '--with-pspell=/usr/local' '--enable-session' '--enable-sockets'
    '--enable-tokenizer' '--with-expat-dir=/usr/local' '--enable-xml'
    '--with-zip=/usr/local' '--with-zlib=yes'
    '--with-apxs2=/usr/local/sbin/apxs' '--with-imap=/usr/local'
    '--with-imap-ssl=/usr/local' '--prefix=/usr/local'
    'i386-portbld-freebsd4.7'

    Reproduce code:
    ---------------
    <?
    glob("{*.foo,*.bar}", GLOB_BRACE);
    ?>

    Expected result:
    ----------------
    glob() should return FALSE, indicating that there were no files or
    directories matching the pattern.

    Actual result:
    --------------
    PHP exits on signal 11 (segmentation fault), as illustrated by these
    entries in my Apache error log:

    [Tue Oct 28 22:38:02 2003] [notice] child pid 68645 exit signal
    Segmentation fault (11)
    [Tue Oct 28 22:38:03 2003] [notice] child pid 68670 exit signal
    Segmentation fault (11)
    [Tue Oct 28 22:38:12 2003] [notice] child pid 68800 exit signal
    Segmentation fault (11)



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=26025&edit=1[/url]
    alan_k@php.net Guest

  2. #2

    Default #26025 [Opn->Fbk]: segfault when glob() is called with GLOB_BRACE and there are no matches

    ID: 26025
    Updated by: [email]moriyoshiphp.net[/email]
    Reported By: ryan at wonko dot com
    -Status: Open
    +Status: Feedback
    Bug Type: Filesystem function related
    Operating System: FreeBSD 4.7-RELEASE
    PHP Version: 4.3.4RC2
    New Comment:

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php4-STABLE-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php4-win32-STABLE-latest.zip[/url]




    Previous Comments:
    ------------------------------------------------------------------------

    [2003-10-29 02:06:23] ryan at wonko dot com

    Here's the backtrace:

    #0 0x80b0906 in zif_glob (ht=2, return_value=0x81fb224, this_ptr=0x0,
    return_value_used=0)
    at /usr/home/ryan/testphp/php-4.3.4RC2/ext/standard/dir.c:409
    #1 0x8166a93 in execute (op_array=0x81fa8a4) at
    /usr/home/ryan/testphp/php-4.3.4RC2/Zend/zend_execute.c:1616
    #2 0x8155d49 in zend_execute_scripts (type=8, retval=0x0,
    file_count=3) at /usr/home/ryan/testphp/php-4.3.4RC2/Zend/zend.c:885
    #3 0x81231a3 in php_execute_script (primary_file=0xbfbffb40) at
    /usr/home/ryan/testphp/php-4.3.4RC2/main/main.c:1729
    #4 0x816caf7 in main (argc=2, argv=0xbfbffbb0) at
    /usr/home/ryan/testphp/php-4.3.4RC2/sapi/cli/php_cli.c:819
    #5 0x806035d in _start ()

    ------------------------------------------------------------------------

    [2003-10-29 01:41:55] ryan at wonko dot com

    Description:
    ------------
    When you call glob() with the GLOB_BRACE flag set, PHP segfaults if
    there are no files or directories matching the pattern.

    I'm running Apache 2.0.47 and PHP was built with the following
    configure line:

    './configure' '--enable-versioning' '--enable-memory-limit'
    '--with-layout=GNU' '--with-zlib-dir=/usr' '--disable-all'
    '--with-regex=php' '--disable-cli' '--with-bz2=/usr' '--enable-ctype'
    '--with-dom=/usr/local' '--enable-exif' '--enable-ftp' '--with-gd'
    '--enable-gd-native-ttf' '--enable-gd-jis-conv'
    '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
    '--with-png-dir=/usr/local' '--with-xpm-dir=/usr/local'
    '--with-gettext=/usr/local' '--with-mysql=/usr/local'
    '--with-openssl-dir=/usr/local' '--with-openssl=/usr/local'
    '--enable-overload' '--with-pcre-regex=yes' '--enable-posix'
    '--with-pspell=/usr/local' '--enable-session' '--enable-sockets'
    '--enable-tokenizer' '--with-expat-dir=/usr/local' '--enable-xml'
    '--with-zip=/usr/local' '--with-zlib=yes'
    '--with-apxs2=/usr/local/sbin/apxs' '--with-imap=/usr/local'
    '--with-imap-ssl=/usr/local' '--prefix=/usr/local'
    'i386-portbld-freebsd4.7'

    Reproduce code:
    ---------------
    <?
    glob("{*.foo,*.bar}", GLOB_BRACE);
    ?>

    Expected result:
    ----------------
    glob() should return FALSE, indicating that there were no files or
    directories matching the pattern.

    Actual result:
    --------------
    PHP exits on signal 11 (segmentation fault), as illustrated by these
    entries in my Apache error log:

    [Tue Oct 28 22:38:02 2003] [notice] child pid 68645 exit signal
    Segmentation fault (11)
    [Tue Oct 28 22:38:03 2003] [notice] child pid 68670 exit signal
    Segmentation fault (11)
    [Tue Oct 28 22:38:12 2003] [notice] child pid 68800 exit signal
    Segmentation fault (11)



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=26025&edit=1[/url]
    moriyoshi@php.net Guest

Similar Threads

  1. Replies: 0
    Last Post: November 7th, 12:25 AM
  2. Replies: 1
    Last Post: October 30th, 03:46 AM
  3. Replies: 0
    Last Post: October 30th, 03:43 AM
  4. Replies: 1
    Last Post: October 29th, 09:11 PM
  5. Replies: 0
    Last Post: October 29th, 06:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139