Page MenuHomePhabricator

Make sure TempFiles are destroyed after a PHP fatal error
ClosedPublic

Authored by epriestley on Aug 21 2014, 6:39 PM.
Tags
None
Referenced Files
F15503677: D10329.id24869.diff
Mon, Apr 14, 12:03 PM
F15479883: D10329.id24867.diff
Tue, Apr 8, 9:54 AM
F15475959: D10329.id24866.diff
Mon, Apr 7, 1:41 AM
F15471502: D10329.id24866.diff
Sat, Apr 5, 5:22 AM
F15468593: D10329.id.diff
Fri, Apr 4, 2:44 AM
F15467161: D10329.diff
Thu, Apr 3, 1:19 PM
F15419095: D10329.id24866.diff
Fri, Mar 21, 3:26 AM
F15397601: D10329.diff
Mar 16 2025, 9:18 PM
Subscribers

Details

Summary

Fixes T4284. Object destructors are not called after a fatal, but shutdown functions are.

Test Plan
  • Created a test script which makes a temp file, then fatals.
  • Before patch, temp file was left around.
  • After patch, it is cleaned up.
  • Explicitly destroyed the tempfile in the script to verify that double-destruction is fine.
  • Removed fatal to verify that normal behavior works as expected.

Diff Detail

Repository
rPHU libphutil
Branch
tfile
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2319
Build 2323: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Make sure TempFiles are destroyed after a PHP fatal error.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
  • Also null out the path, just in case someone tries to do something silly with a destroyed file.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Aug 21 2014, 6:49 PM
epriestley updated this revision to Diff 24869.

Closed by commit rPHU8695cdb1270b (authored by @epriestley).