I'm building my x64 python c library extension from x86 one.
I found out fread
with a file pointer opend by fopen64
killed the python process because of an error APPCRASH
of ntdll.dll
. It doesn't happen under x86 build and neither happen if the file pointer is opened by fopen
.
First, I thought it happened because of Windows bug mentioned here. But it didn't fix it.
Is there any good practice to avoid this problem? I'm considering make definition to choose witch file open function is used so that it can work under both x64 and x86, but I don't have any marvelous ideas to do so.
My Environment
- Windows 7 x64
- Python 2.7.10 x64
- Numpy 1.11.0
- MinGW64