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
F19302621: D10329.diff
Tue, Dec 23, 3:45 PM
F19176837: D10329.id24869.diff
Tue, Dec 16, 12:13 AM
F19087885: D10329.id.diff
Wed, Dec 3, 2:33 AM
F19084068: D10329.diff
Tue, Dec 2, 2:18 PM
F19060887: D10329.id24866.diff
Sat, Nov 29, 10:56 AM
F19060882: D10329.id24866.diff
Sat, Nov 29, 10:56 AM
F18853022: D10329.diff
Oct 31 2025, 1:44 PM
F18777502: D10329.diff
Oct 11 2025, 3:22 AM
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 2320
Build 2324: [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).