Bug #49664 [ReO->Nab]: Clone causes Segmentation fault

From: Date: Thu, 03 Apr 2014 12:15:14 +0000
Subject: Bug #49664 [ReO->Nab]: Clone causes Segmentation fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185069@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49664&edit=1

 ID:                 49664
 Updated by:         mike@php.net
 Reported by:        patrik dot lermon at gmail dot com
 Summary:            Clone causes Segmentation fault
-Status:             Re-Opened
+Status:             Not a bug
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Linux
 PHP Version:        5.*, 6 (2009-09-20)
 Block user comment: N
 Private report:     N

 New Comment:

@cataphract, why was this re-opened?
AFAICT there won't be a recursion counter.


Previous Comments:
------------------------------------------------------------------------
[2013-08-07 20:19:34] initrd dot gz at gmail dot com

C lets you do a lot of stuff you aren't supposed to do. Just because C allows it 
doesn't mean higher level languages like PHP should. An out of memory error is 
much more helpful than a segfault, which could come from anything. Also, segfaults 
have historically lead to exploits.

------------------------------------------------------------------------
[2013-04-06 17:45:36] dinesh dot joshi at yahoo dot com

This segmentation fault / coredump behavior is consistent with what lower level 
languages like C. So IMHO this should not be considered a PHP bug. Just don't get 
into infinite recursions. The language can't stop you from doing something stupid.

Here's a C program that demos the same behavior:

------------------------------
#include<stdio.h>

void fn() {
    char buff[16*1024]; 
    fn();
}

int main(void) {
    fn();
}
------------------------------

------------------------------------------------------------------------
[2013-02-23 22:58:49] cataphract@php.net

Still present in trunk; reopening.

------------------------------------------------------------------------
[2013-01-28 13:43:17] cf0hay at gmail dot com

Same az OP (with PHP 5.4.8):

$ php a.php
a before cloning:
a: [- >]
Segmentation fault

------------------------------------------------------------------------
[2013-01-23 12:07:28] patrik dot lermon at gmail dot com

And what do you get when you try with the reproduce code?

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


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

    https://bugs.php.net/bug.php?id=49664


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=49664&edit=1


Thread (22 messages)

« previous php.bugs (#185069) next »