Interrupt unsafety of WITH-OPEN-STREAM and -FILE

Bug #558517 reported by Tobias C. Rittweiler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Low
Unassigned

Bug Description

Neither WITH-OPEN-STREAM, nor WITH-OPEN-FILE disable
interrupts to prevent leakage due to interrupts.

Anything against doing that?

A further idea:

Is it possible to determine whether an FD was reclaimed, or not?

If the answer to that question happens to be yes, how about a
finalizer on FD-STREAMs which emits a warning in case an
FD-STREAM is garbage-collected that is not reclaimed yet?

Revision history for this message
Tobias C. Rittweiler (tcr) wrote :

I forgot to mention that despite of using W/O-INTERRUPTS
around the UWP in WITH-OPEN-FILE, one could still lose
an FD within OPEN itself. And disabling interrupts during
the extent of OPEN does not sound very right either in case
of blocking.

Still, disabling interrupts around the UWP would minimize the
window.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

As long as arbitrary user-code isn't being run with interrupts silently disabled and the performance cost isn't terrible, I'm all for increasing interrupt safety.

Changed in sbcl:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.