Bug #62737 [Ana->Csd]: Segfault invoking SplFileInfo->openFile

From: Date: Tue, 16 Feb 2021 13:21:04 +0000
Subject: Bug #62737 [Ana->Csd]: Segfault invoking SplFileInfo->openFile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232193@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62737&edit=1

 ID:                 62737
 Updated by:         cmb@php.net
 Reported by:        leight at gmail dot com
 Summary:            Segfault invoking SplFileInfo->openFile
-Status:             Analyzed
+Status:             Closed
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Linux / OSX
 PHP Version:        master-Git-2012-08-03 (Git)
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

This has apparently been fixed in the meantime.  Running the test
script wth PHP-7.3, PHP-7.4 and PHP-8.0, prints:

Warning: SplFileInfo() has been disabled for security reasons in %s on line %d

Fatal error: Uncaught Error: Call to undefined method SplFileInfo::openFile() in %s:%d


Previous Comments:
------------------------------------------------------------------------
[2020-04-24 18:49:50] alexinbeijing at gmail dot com

Related To: Bug #78583

------------------------------------------------------------------------
[2012-08-05 08:28:40] laruence@php.net

you have to realize that they are two different bugs.

1. dangling pointer ; //this is bad. 
2. spl's bug.  //this should be fixed later. that is what I am working on. if    
throw exception(in disable_class_new) is allowd, this will be easy. but for NOW, 
I don't think so, so yeah, it will be a little tough.

------------------------------------------------------------------------
[2012-08-05 07:34:55] reeze dot xia at gmail dot com

Hi, laruence, 
   I use the test case in this bug report. after apply the latest patch(#62744 
and the attached one). i got:

Fatal error: Couldn't find implementation for method SplFileObject::__construct 
in Unknown on line 0

if any internal's parent class was disabled may cause segfault, I have test 
RecursiveArrayIterator (by disable ArrayIterator), it will segfault if not apply 
the patch for #62744, and will leaks after apply the patch. There must be 
other classes have the same problem,

even though we fixed this bug, there will really
a lot of them need to  be fixed too :(   we may need a better way to handle
class disabling.

------------------------------------------------------------------------
[2012-08-04 15:14:39] laruence@php.net

The following patch has been added/updated:

Patch Name: bug62737.phpt
Revision:   1344093279
URL:        https://bugs.php.net/patch-display.php?bug=62737&patch=bug62737.phpt&revision=1344093279

------------------------------------------------------------------------
[2012-08-04 15:13:57] laruence@php.net

The following patch has been added/updated:

Patch Name: bug62737.patch
Revision:   1344093237
URL:        https://bugs.php.net/patch-display.php?bug=62737&patch=bug62737.patch&revision=1344093237

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


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=62737


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


Thread (16 messages)

« previous php.bugs (#232193) next »