Professional Web Applications Themes

#40883 [NEW]: mysql_query() is allocating memory incorrectly - PHP Bugs

From: edwin at aucs dot org Operating system: WinXP PHP version: 5.2.1 PHP Bug Type: MySQL related Bug description: mysql_query() is allocating memory incorrectly Description: ------------ Memory leak in mysql_query, memory not being able to be freed by mysql_free_result properly Reproduce code: --------------- Refer to Listing 4 to 7 of http://www-128.ibm.com/developerworks/opensource/library/os-php-v521/ Expected result: ---------------- No memory leakage Actual result: -------------- mysql_query() is allocating memory incorrectly, even with the latest CVS snap -- Edit bug report at http://bugs.php.net/?id=40883&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40883&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40883&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40883&r=trysnapshot60 Fixed ...

  1. #1

    Default #40883 [NEW]: mysql_query() is allocating memory incorrectly

    From: edwin at aucs dot org
    Operating system: WinXP
    PHP version: 5.2.1
    PHP Bug Type: MySQL related
    Bug description: mysql_query() is allocating memory incorrectly

    Description:
    ------------
    Memory leak in mysql_query, memory not being able to be freed by
    mysql_free_result properly

    Reproduce code:
    ---------------
    Refer to Listing 4 to 7 of
    http://www-128.ibm.com/developerworks/opensource/library/os-php-v521/

    Expected result:
    ----------------
    No memory leakage

    Actual result:
    --------------
    mysql_query() is allocating memory incorrectly, even with the latest CVS
    snap

    --
    Edit bug report at http://bugs.php.net/?id=40883&edit=1
    --
    Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40883&r=trysnapshot44
    Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40883&r=trysnapshot52
    Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40883&r=trysnapshot60
    Fixed in CVS: http://bugs.php.net/fix.php?id=40883&r=fixedcvs
    Fixed in release: http://bugs.php.net/fix.php?id=40883&r=alreadyfixed
    Need backtrace: http://bugs.php.net/fix.php?id=40883&r=needtrace
    Need Reproduce Script: http://bugs.php.net/fix.php?id=40883&r=needscript
    Try newer version: http://bugs.php.net/fix.php?id=40883&r=oldversion
    Not developer issue: http://bugs.php.net/fix.php?id=40883&r=support
    Expected behavior: http://bugs.php.net/fix.php?id=40883&r=notwrong
    Not enough info: http://bugs.php.net/fix.php?id=40883&r=notenoughinfo
    Submitted twice: http://bugs.php.net/fix.php?id=40883&r=submittedtwice
    register_globals: http://bugs.php.net/fix.php?id=40883&r=globals
    PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40883&r=php3
    Daylight Savings: http://bugs.php.net/fix.php?id=40883&r=dst
    IIS Stability: http://bugs.php.net/fix.php?id=40883&r=isapi
    Install GNU Sed: http://bugs.php.net/fix.php?id=40883&r=gnused
    Floating point limitations: http://bugs.php.net/fix.php?id=40883&r=float
    No Zend Extensions: http://bugs.php.net/fix.php?id=40883&r=nozend
    MySQL Configuration Error: http://bugs.php.net/fix.php?id=40883&r=mysqlcfg
    edwin Guest

  2. #2

    Default #40883 [Opn->Bgs]: mysql_query() is allocating memory incorrectly

    ID: 40883
    Updated by: net
    Reported By: edwin at aucs dot org
    -Status: Open
    +Status: Bogus
    Bug Type: MySQL related
    Operating System: WinXP
    PHP Version: 5.2.1
    New Comment:

    The engine caches small memory blocks.


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

    [2007-03-21 16:13:57] edwin at aucs dot org

    Description:
    ------------
    Memory leak in mysql_query, memory not being able to be freed by
    mysql_free_result properly

    Reproduce code:
    ---------------
    Refer to Listing 4 to 7 of
    http://www-128.ibm.com/developerworks/opensource/library/os-php-v521/

    Expected result:
    ----------------
    No memory leakage

    Actual result:
    --------------
    mysql_query() is allocating memory incorrectly, even with the latest
    CVS snap


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


    --
    Edit this bug report at http://bugs.php.net/?id=40883&edit=1
    tony2001@php.net Guest

  3. #3

    Default #40883 [Bgs->Csd]: mysql_query() is allocating memory incorrectly

    ID: 40883
    Updated by: net
    Reported By: edwin at aucs dot org
    -Status: Bogus
    +Status: Closed
    Bug Type: MySQL related
    Operating System: WinXP
    PHP Version: 5.2.1
    -Assigned To:
    +Assigned To: dmitry
    New Comment:

    The problem was in Zend Memory Manager, that cached small memory blocks
    and didn't reuse cache on erealloc().

    Fixed in CVS HEAD and PHP_5_2.


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

    [2007-03-21 16:26:25] net

    The engine caches small memory blocks.

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

    [2007-03-21 16:13:57] edwin at aucs dot org

    Description:
    ------------
    Memory leak in mysql_query, memory not being able to be freed by
    mysql_free_result properly

    Reproduce code:
    ---------------
    Refer to Listing 4 to 7 of
    http://www-128.ibm.com/developerworks/opensource/library/os-php-v521/

    Expected result:
    ----------------
    No memory leakage

    Actual result:
    --------------
    mysql_query() is allocating memory incorrectly, even with the latest
    CVS snap


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


    --
    Edit this bug report at http://bugs.php.net/?id=40883&edit=1
    dmitry@php.net Guest

Similar Threads

  1. Replies: 2
    Last Post: April 17th, 01:01 PM
  2. Allocating memory
    By Tristanbully in forum Adobe Illustrator Macintosh
    Replies: 5
    Last Post: May 21st, 03:08 PM
  3. mysql_query
    By Hi Ho in forum PHP Development
    Replies: 2
    Last Post: February 12th, 11:32 AM
  4. mysql_query return value
    By Bruce A. Julseth in forum PHP Development
    Replies: 4
    Last Post: November 28th, 07:52 PM
  5. Allocating memory starting at 0x00000000
    By James Weatherley in forum Mac Programming
    Replies: 4
    Last Post: August 26th, 04:57 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