Project

General

Profile

Emulator Issues #9273

Replace stdio usage by IOFile, imlpement IOFile on top of win32 CreateFile/ReadFile/... on Windows

Added by delroth almost 4 years ago. Updated 10 months ago.

Status:
Accepted
Priority:
High
Assignee:
-
% Done:

0%

Operating system:
Windows
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Microsoft's CRT still ships with the fread bug from #8930 causing Dolphin crashes on Windows. We work around it by monkey-patching known buggy versions of the CRT libraries. However, that will not work anymore if MS releases a new version of the CRT with the bug. This means that Dolphin 5.0 might end up not working anymore on some setups, leaving us with no alternative other than release a 5.0.1 with a new monkey-patch added.

To avoid this happening, I suggest we should stop using stdio on Windows. All stdio usage should switch to use IOFile instead, and IOFile on Windows should be implemented on top of the win32 CreateFile, ReadFile, WriteFile, ... API which is less likely to have issues of the sort.

History

#1 Updated by delroth almost 4 years ago

Too much work and nobody working on it. Let's just hope MS fixed the bug in all subsequent versions of the CRT.

#2 Updated by delroth almost 4 years ago

  • Milestone deleted (Current)

#3 Updated by Billiard26 10 months ago

Making IOFile use CreateFile and friends would be easy.
We don't make much use of stdio directly but does Microsoft implement fstream in terms of stdio?
There are a handful of fstream usages.

Also available in: Atom PDF