Message136184
Digging deeper with the Visual Studio debugger, I discovered the following interesting outcome (run with cmd.exe):
@echo off
mklink /d sample sample-target
mkdir sample-target
echo "" > sample-target\__init__.py
:: Before KB2467174, returns 0; after, returns -1
python -c "import ctypes; buf = (ctypes.c_char*256)(); print(ctypes.windll.msvcr90._wstat64i32(u'sample', ctypes.byref(buf)))"
:: Always returns 13
python -c "import ctypes; fd = ctypes.c_int(-1); print(ctypes.windll.msvcrt._wsopen_s(ctypes.byref(fd), u'sample', 0, 0x40, 0))"
rmdir sample
rmdir /s /q sample-target
The call to _wstat64i32 is returning -1 with the patched CRT... but when I traced _wstat64i32 (on a machine with the patched CRT), it called _wsopen_s, which apparently always returns -1.
So my guess is that the patched CRT changed something about _wstat64i32 such that it doesn't defer to _wsopen_s. I'm going to see if I can get an early version of Visual Studio that I can trace where _wstat64i32 doesn't fail. |
|
Date |
User |
Action |
Args |
2011-05-17 21:36:58 | jaraco | set | recipients:
+ jaraco, ncoghlan, brian.curtin, asvetlov, santoso.wijaya, wkornewald |
2011-05-17 21:36:58 | jaraco | set | messageid: <1305668218.55.0.407654153709.issue6727@psf.upfronthosting.co.za> |
2011-05-17 21:36:58 | jaraco | link | issue6727 messages |
2011-05-17 21:36:57 | jaraco | create | |
|