#40617 [NEW]: memory corruption

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40617 [NEW]: memory corruption

    From: slacouette at edma dot com
    Operating system: linux (FC6)
    PHP version: 5.2.1
    PHP Bug Type: Strings related
    Bug description: memory corruption

    Description:
    ------------
    Repeated calls to str_ireplace appear to cause memory corruption if
    replacement is made. In my web application, the resulting string will
    "echo" fine but html page generated in subsequent class module is never
    served. str_replace works fine. Code working fine until upgrade to
    5.2.1.

    Thanks - great stuff you guys do!

    Reproduce code:
    ---------------
    $str_s = str_replace( array('(t)', '(tm)', '™', chr(153)), '
    (trade marked)', $str_s );

    $str_s = str_replace( array('(r)', '(reg)', '®', chr(174)), '
    (registered)', $str_s );

    $str_s = str_replace( array('(c)', '(copy)', '©', chr(169)), '
    (copyrighted)', $str_s );


    Expected result:
    ----------------
    proper substitution and web page served

    Actual result:
    --------------
    guessing memory corruption as html never generated.

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

  2. Similar Questions and Discussions

    1. Memory corruption - SDK 7
      I found that the AVAppGetLanguageWithParams function does a memory corruption by putting 0 at the 35-36th bytes following the AVAppLanguageParams...
    2. #24834 [NEW]: Memory corruption bug in object destructor
      From: vma1 at abv dot bg Operating system: Slackware Linux 9.0 PHP version: 5CVS-2003-07-28 (dev) PHP Bug Type: Zend Engine 2...
    3. #24659 [Ver]: Crash due to some internal memory corruption (?)
      ID: 24659 Updated by: sniper@php.net Reported By: fujimura at wakhok dot ac dot jp Status: Verified Bug Type: ...
    4. #24695 [Fbk]: SEGV in zend_hash_find - possible memory corruption?
      ID: 24695 Updated by: sniper@php.net Reported By: jna at retina dot net Status: Feedback Bug Type: ...
    5. #24695 [NEW]: SEGV in zend_hash_find - possible memory corruption?
      From: jna at retina dot net Operating system: Redhat Linux 7.2 PHP version: 5CVS-2003-07-17 (dev) PHP Bug Type: Scripting...
  3. #2

    Default #40617 [Opn->Csd]: memory corruption

    ID: 40617
    User updated by: nevermind at address dot org
    -Reported By: slacouette at edma dot com
    +Reported By: nevermind at address dot org
    -Status: Open
    +Status: Closed
    Bug Type: Strings related
    Operating System: linux (FC6)
    PHP Version: 5.2.1
    New Comment:

    Likely this is too obscure to find with what I've provided.


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

    [2007-02-24 01:55:22] nevermind at address dot org

    Description:
    ------------
    Repeated calls to str_ireplace appear to cause memory corruption if
    replacement is made. In my web application, the resulting string will
    "echo" fine but html page generated in subsequent class module is never
    served. str_replace works fine. Code working fine until upgrade to
    5.2.1.

    Thanks - great stuff you guys do!

    Reproduce code:
    ---------------
    $str_s = str_replace( array('(t)', '(tm)', '™', chr(153)), '
    (trade marked)', $str_s );

    $str_s = str_replace( array('(r)', '(reg)', '®', chr(174)), '
    (registered)', $str_s );

    $str_s = str_replace( array('(c)', '(copy)', '©', chr(169)), '
    (copyrighted)', $str_s );


    Expected result:
    ----------------
    proper substitution and web page served

    Actual result:
    --------------
    guessing memory corruption as html never generated.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40617&edit=1[/url]
    nevermind at address dot org Guest

  4. #3

    Default #40617 [Csd]: problem refinement

    ID: 40617
    User updated by: nevermind at address dot org
    -Summary: memory corruption
    Reported By: nevermind at address dot org
    Status: Closed
    Bug Type: Strings related
    Operating System: linux (FC6)
    PHP Version: 5.2.1
    New Comment:

    non-alphabetic "search" argument for str_ireplace causes memory
    corruption.


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

    [2007-02-24 02:05:33] nevermind at address dot org

    Likely this is too obscure to find with what I've provided.

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

    [2007-02-24 01:55:22] nevermind at address dot org

    Description:
    ------------
    Repeated calls to str_ireplace appear to cause memory corruption if
    replacement is made. In my web application, the resulting string will
    "echo" fine but html page generated in subsequent class module is never
    served. str_replace works fine. Code working fine until upgrade to
    5.2.1.

    Thanks - great stuff you guys do!

    Reproduce code:
    ---------------
    $str_s = str_replace( array('(t)', '(tm)', '™', chr(153)), '
    (trade marked)', $str_s );

    $str_s = str_replace( array('(r)', '(reg)', '®', chr(174)), '
    (registered)', $str_s );

    $str_s = str_replace( array('(c)', '(copy)', '©', chr(169)), '
    (copyrighted)', $str_s );


    Expected result:
    ----------------
    proper substitution and web page served

    Actual result:
    --------------
    guessing memory corruption as html never generated.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40617&edit=1[/url]
    nevermind at address dot org Guest

Posting Permissions

  • You may not post new threads
  • You may 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