|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36838 segfault with unclosed dir on streamwrapper
Submitted: 2006-03-23 22:36 UTC Modified: 2006-03-28 12:45 UTC
From: Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
25 + 39 = ?
Subscribe to this entry?

 [2006-03-23 22:36 UTC]
Running the reproduce code causes a segfault on shutdown when trying to call dir_closedir() of the stream wrapper class for the not-closed (commented out) closedir($dh).

While in this case it can easily be fixed by activly calling closedir(), it cannot if the SPL DirectoryIterator is used, which will cause a 2nd call to dir_closedir() with an invalid  handle (?) 

Reproduce code:

Expected result:
Normal shutdown

Actual result:
Segfault in shutdown process


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-28 12:45 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of bug #36320
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Nov 29 10:01:27 2023 UTC