Closed Bug 848020 Opened 8 years ago Closed 8 years ago

Do we really have to poison NtFlushBuffersFile?

Categories

(Core :: XPCOM, defect, P2)

x86
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: espindola, Assigned: espindola)

References

Details

Attachments

(1 file)

Reading the wine source it really looks like NtFlushBuffersFile is just the windows equivalent of flush. So poisoning it would only be necessary if we were trying to prevent data loss in power failures, not firefox calling exit(0).

Am I missing something about NtFlushBuffersFile semantics? Doesn't windows save buffers when a process exits?
Flags: needinfo?(ehsan)
I think it does, unless you call TerminateProcess.  It might be worth looking into the differences between ExitProcess and TerminateProcess (I think the first one is supposed to flush all I/O buffers.)
Flags: needinfo?(ehsan)
Attached patch patchSplinter Review
OK. It looks like that windows does write the data to disk on exit but not on terminate. While poisoning NtFlushBuffersFile would be an interesting project to protect against data loss in a power loss or firefox being killed, that is out of scope of the exit(0) project.
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attachment #722242 - Flags: review?(bgirard)
Attachment #722242 - Flags: review?(bgirard) → review+
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/fe8a8cad48a4
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Depends on: 850957
Depends on: 853128
You need to log in before you can comment on or make changes to this bug.