Professional Web Applications Themes

#24824 [Opn->Fbk]: dba_ routines with ndbm crash - PHP Development

ID: 24824 Updated by: [email]iliaaphp.net[/email] Reported By: php at johnlevine dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: BSD/OS 4.3.1 PHP Version: 4.3.2 New Comment: could you please provide the sample db, I am unabled to te the problem using a ndbm database that I have. Previous Comments: ------------------------------------------------------------------------ [2003-07-26 20:40:48] php at johnlevine dot com Description: ------------ This program prints Resource handle #5, and then crashes. It works OK in 4.2.2, crashes in a version of 4.3.0 I had lying around. It crashes in the Apache module, which is where I first noticed it. There ...

  1. #1

    Default #24824 [Opn->Fbk]: dba_ routines with ndbm crash

    ID: 24824
    Updated by: [email]iliaaphp.net[/email]
    Reported By: php at johnlevine dot com
    -Status: Open
    +Status: Feedback
    Bug Type: Reproducible crash
    Operating System: BSD/OS 4.3.1
    PHP Version: 4.3.2
    New Comment:

    could you please provide the sample db, I am unabled to te the
    problem using a ndbm database that I have.


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

    [2003-07-26 20:40:48] php at johnlevine dot com

    Description:
    ------------
    This program prints Resource handle #5, and then crashes.
    It works OK in 4.2.2, crashes in a version of 4.3.0 I had
    lying around. It crashes in the Apache module, which is
    where I first noticed it.

    There also seems to be a change since 4.2 that it used to append .db to
    the file name but doesn't any more.

    It's compiled --with-mysql --with-apxs --with-ndbm

    (I know that ndbm is old and tired, but it's distributed
    with BSD/OS and I have a lot of existing ndbm files that
    I'm using.)


    Reproduce code:
    ---------------
    $a = dba_popen("test.db", "r", "ndbm");
    print "handle is $a\n"; // prints Resource #5

    $k = dba_firstkey($a);
    print "key is $k\n"; // segfaults, see trace below


    Expected result:
    ----------------
    should print first key in db file


    Actual result:
    --------------
    Segmentation violation:
    #0 0x481b5f1d in dbm_firstkey () from /shlib/libc.so.2
    #1 0x806486f in dba_firstkey_ndbm (info=0x81bdf00, newlen=0x8046070)
    at /home/src/php-4.3.2/ext/dba/dba_ndbm.c:126
    #2 0x8063a74 in zif_dba_firstkey (ht=1, return_value=0x81bc68c,
    this_ptr=0x0,
    return_value_used=1) at /home/src/php-4.3.2/ext/dba/dba.c:704
    #3 0x8139bf3 in execute (op_array=0x81bb88c)
    at /home/src/php-4.3.2/Zend/zend_execute.c:1608
    #4 0x812821e in zend_execute_scripts (type=8, retval=0x0,
    file_count=3)
    at /home/src/php-4.3.2/Zend/zend.c:869
    #5 0x8100275 in php_execute_script (primary_file=0x8047a94)
    at /home/src/php-4.3.2/main/main.c:1671
    #6 0x814188e in main (argc=2, argv=0x8047afc)
    at /home/src/php-4.3.2/sapi/cli/php_cli.c:806
    #7 0x8061843 in __start ()



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


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

    iliaa@php.net Guest

  2. #2

    Default #24824 [Opn->Fbk]: dba_ routines with ndbm crash

    ID: 24824
    Updated by: [email]hellyphp.net[/email]
    Reported By: php at johnlevine dot com
    -Status: Open
    +Status: Feedback
    Bug Type: Reproducible crash
    Operating System: BSD/OS 4.3.1
    PHP Version: 4.3.2
    New Comment:

    Please provide the outputs of the following two commands using CLI or
    CGI version of php:
    1) php run-tests.php ext/dba
    2) ldd php


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

    [2003-07-27 11:22:26] php at johnlevine dot com

    On my system, it crashes with any dbm file, even one with no
    entries.

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

    [2003-07-27 10:10:42] [email]iliaaphp.net[/email]

    could you please provide the sample db, I am unabled to te the
    problem using a ndbm database that I have.

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

    [2003-07-26 20:40:48] php at johnlevine dot com

    Description:
    ------------
    This program prints Resource handle #5, and then crashes.
    It works OK in 4.2.2, crashes in a version of 4.3.0 I had
    lying around. It crashes in the Apache module, which is
    where I first noticed it.

    There also seems to be a change since 4.2 that it used to append .db to
    the file name but doesn't any more.

    It's compiled --with-mysql --with-apxs --with-ndbm

    (I know that ndbm is old and tired, but it's distributed
    with BSD/OS and I have a lot of existing ndbm files that
    I'm using.)


    Reproduce code:
    ---------------
    $a = dba_popen("test.db", "r", "ndbm");
    print "handle is $a\n"; // prints Resource #5

    $k = dba_firstkey($a);
    print "key is $k\n"; // segfaults, see trace below


    Expected result:
    ----------------
    should print first key in db file


    Actual result:
    --------------
    Segmentation violation:
    #0 0x481b5f1d in dbm_firstkey () from /shlib/libc.so.2
    #1 0x806486f in dba_firstkey_ndbm (info=0x81bdf00, newlen=0x8046070)
    at /home/src/php-4.3.2/ext/dba/dba_ndbm.c:126
    #2 0x8063a74 in zif_dba_firstkey (ht=1, return_value=0x81bc68c,
    this_ptr=0x0,
    return_value_used=1) at /home/src/php-4.3.2/ext/dba/dba.c:704
    #3 0x8139bf3 in execute (op_array=0x81bb88c)
    at /home/src/php-4.3.2/Zend/zend_execute.c:1608
    #4 0x812821e in zend_execute_scripts (type=8, retval=0x0,
    file_count=3)
    at /home/src/php-4.3.2/Zend/zend.c:869
    #5 0x8100275 in php_execute_script (primary_file=0x8047a94)
    at /home/src/php-4.3.2/main/main.c:1671
    #6 0x814188e in main (argc=2, argv=0x8047afc)
    at /home/src/php-4.3.2/sapi/cli/php_cli.c:806
    #7 0x8061843 in __start ()



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


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

    helly@php.net Guest

Similar Threads

  1. InDesign CS CE non-stop CRASH, CRASH, CRASH, CRASH, CRASH, CRASH
    By kajzica@adobeforums.com in forum Adobe Indesign Windows
    Replies: 15
    Last Post: July 2nd, 07:57 PM
  2. #23975 [Asn->WFx]: dba_open locking error with ndbm/db2/db3
    By helly@php.net in forum PHP Development
    Replies: 0
    Last Post: November 13th, 09:09 AM
  3. #24824 [Opn->WFx]: dba_ routines with ndbm crash
    By helly@php.net in forum PHP Development
    Replies: 0
    Last Post: August 6th, 07:40 AM
  4. #24824 [Opn]: dba_ routines with ndbm crash
    By php at johnlevine dot com in forum PHP Development
    Replies: 0
    Last Post: August 6th, 12:56 AM
  5. #24824 [Fbk->Opn]: dba_ routines with ndbm crash
    By php at johnlevine dot com in forum PHP Development
    Replies: 1
    Last Post: July 27th, 07:05 PM

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