Professional Web Applications Themes

#25713 [Bgs->Opn]: endless self call loop - PHP Development

ID: 25713 User updated by: kevin at netflex dot nl Reported By: kevin at netflex dot nl -Status: Bogus +Status: Open Bug Type: Reproducible crash Operating System: Windows/Netware and maybe more PHP Version: 4.3.3 New Comment: 1. we did 2. buffer overflow?? is this normal for you?? 3. i don't agree, i could crash any php hosting if i want. ;-) Previous Comments: ------------------------------------------------------------------------ [2003-10-01 10:33:30] [email]sniperphp.net[/email] 1. You didn't search the bug database first 2. This is expected. 3. We won't "fix" it. ------------------------------------------------------------------------ [2003-10-01 10:08:45] kevin at netflex dot nl The problem isn't with the call by ref. ...

  1. #1

    Default #25713 [Bgs->Opn]: endless self call loop

    ID: 25713
    User updated by: kevin at netflex dot nl
    Reported By: kevin at netflex dot nl
    -Status: Bogus
    +Status: Open
    Bug Type: Reproducible crash
    Operating System: Windows/Netware and maybe more
    PHP Version: 4.3.3
    New Comment:

    1. we did
    2. buffer overflow?? is this normal for you??
    3. i don't agree, i could crash any php hosting if i want.

    ;-)


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

    [2003-10-01 10:33:30] [email]sniperphp.net[/email]

    1. You didn't search the bug database first
    2. This is expected.
    3. We won't "fix" it.


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

    [2003-10-01 10:08:45] kevin at netflex dot nl

    The problem isn't with the call by ref. but with the following
    situation:

    if you have an function that calls himself endless then PHP crashes.

    See the firt post for more information.

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

    [2003-10-01 09:53:36] kevin at netflex dot nl

    Description:
    ------------
    if you create an function that calls himself with an pass by ref.
    variable then as a result PHP crashes.

    tested with:
    * PHP 5.0.0b2-dev (snapshot: php5-win32-200309251030.zip) on Windows
    (Apache2 2.0.47 and Windows 2003)
    * PHP 4.3.3 on Windows (Apache2 2.0.47 and Windows 2003)
    * PHP 4.2.3 on Netware (Apache2 2.0.47 and Netware 6.5)

    In the web browser appears the page: "can't find server"
    and in the log files there is no information about the error/crash

    Reproduce code:
    ---------------
    crash($test = 0);

    function crash(&$test) {
    if ($test < 10)
    crash($test);
    $test++;
    }

    Expected result:
    ----------------
    the variable test with an value of (int)10

    Actual result:
    --------------
    with PHP4 on Windows only php crashes and with PHP5 on Windows and PHP4
    on Netware both php and apache2 crashes.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25713&edit=1[/url]
    kevin at netflex dot nl Guest

  2. #2

    Default #25713 [Bgs->Opn]: endless self call loop

    ID: 25713
    User updated by: kevin at netflex dot nl
    Reported By: kevin at netflex dot nl
    -Status: Bogus
    +Status: Open
    Bug Type: Reproducible crash
    Operating System: Windows/Netware and maybe more
    PHP Version: 4.3.3
    New Comment:

    i know, (mistake from me ;-).

    But now the problem is that i can crash the server if i want by making
    an endless loop (with calls).


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

    [2003-10-01 11:36:57] [email]moriyoshiphp.net[/email]

    function crash(&$test) {
    if ($test < 10)
    crash($test);
    $test++;
    }

    There's no chance $test is incremented. So no matter how the variable
    is passed to the function, it will definitely go into an infinite loop
    and end up eating up all the stack area which really causes
    segmentation fault.



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

    [2003-10-01 11:14:45] kevin at netflex dot nl

    1. we did
    2. buffer overflow?? is this normal for you??
    3. i don't agree, i could crash any php hosting if i want.

    ;-)

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

    [2003-10-01 10:33:30] [email]sniperphp.net[/email]

    1. You didn't search the bug database first
    2. This is expected.
    3. We won't "fix" it.


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

    [2003-10-01 10:08:45] kevin at netflex dot nl

    The problem isn't with the call by ref. but with the following
    situation:

    if you have an function that calls himself endless then PHP crashes.

    See the firt post for more information.

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

    [2003-10-01 09:53:36] kevin at netflex dot nl

    Description:
    ------------
    if you create an function that calls himself with an pass by ref.
    variable then as a result PHP crashes.

    tested with:
    * PHP 5.0.0b2-dev (snapshot: php5-win32-200309251030.zip) on Windows
    (Apache2 2.0.47 and Windows 2003)
    * PHP 4.3.3 on Windows (Apache2 2.0.47 and Windows 2003)
    * PHP 4.2.3 on Netware (Apache2 2.0.47 and Netware 6.5)

    In the web browser appears the page: "can't find server"
    and in the log files there is no information about the error/crash

    Reproduce code:
    ---------------
    crash($test = 0);

    function crash(&$test) {
    if ($test < 10)
    crash($test);
    $test++;
    }

    Expected result:
    ----------------
    the variable test with an value of (int)10

    Actual result:
    --------------
    with PHP4 on Windows only php crashes and with PHP5 on Windows and PHP4
    on Netware both php and apache2 crashes.


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25713&edit=1[/url]
    kevin at netflex dot nl Guest

  3. #3

    Default #25713 [Bgs->Opn]: endless self call loop

    ID: 25713
    User updated by: kevin at netflex dot nl
    Reported By: kevin at netflex dot nl
    -Status: Bogus
    +Status: Open
    Bug Type: Reproducible crash
    Operating System: Windows/Netware and maybe more
    PHP Version: 4.3.3
    New Comment:

    script to crash the server:

    crash();

    function crash() {
    crash();
    }


    tested with:
    * PHP 5.0.0b2-dev (snapshot: php5-win32-200309251030.zip) on Windows
    (Apache2 2.0.47 and Windows 2003)
    * PHP 4.3.3 on Windows (Apache2 2.0.47 and Windows 2003)
    * PHP 4.2.3 on Netware (Apache2 2.0.47 and Netware 6.5)


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

    [2003-10-01 13:34:40] [email]moriyoshiphp.net[/email]

    Anyway, that's expected behaviour as stated in other bug reports.

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

    [2003-10-01 13:23:07] [email]moriyoshiphp.net[/email]

    You should first try hard to crash it with that tiny script.
    If it really was to go wrong, then reopen this bug to let us know what
    did actually happen on your server :)


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

    [2003-10-01 11:49:00] kevin at netflex dot nl

    i know, (mistake from me ;-).

    But now the problem is that i can crash the server if i want by making
    an endless loop (with calls).

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

    [2003-10-01 11:36:57] [email]moriyoshiphp.net[/email]

    function crash(&$test) {
    if ($test < 10)
    crash($test);
    $test++;
    }

    There's no chance $test is incremented. So no matter how the variable
    is passed to the function, it will definitely go into an infinite loop
    and end up eating up all the stack area which really causes
    segmentation fault.



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

    [2003-10-01 11:14:45] kevin at netflex dot nl

    1. we did
    2. buffer overflow?? is this normal for you??
    3. i don't agree, i could crash any php hosting if i want.

    ;-)

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/25713[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=25713&edit=1[/url]
    kevin at netflex dot nl Guest

Similar Threads

  1. #25713 [Opn->WFx]: endless self call loop
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: October 1st, 11:36 PM
  2. #25713 [Bgs]: endless self call loop
    By moriyoshi@php.net in forum PHP Development
    Replies: 0
    Last Post: October 1st, 05:36 PM
  3. #25713 [Opn->Bgs]: endless self call loop
    By sniper@php.net in forum PHP Development
    Replies: 2
    Last Post: October 1st, 05:25 PM
  4. #25713 [Opn]: endless self call loop
    By kevin at netflex dot nl in forum PHP Development
    Replies: 0
    Last Post: October 1st, 02:11 PM
  5. Director hangs on endless loop
    By _Lars_ webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 5
    Last Post: July 21st, 02:28 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