[tahoe-lafs-trac-stream] [tahoe-lafs] #1531: use ctypes.get_last_error instead of GetLastError to access Windows error code

tahoe-lafs trac at tahoe-lafs.org
Wed Sep 7 16:20:34 PDT 2011


#1531: use ctypes.get_last_error instead of GetLastError to access Windows error
code
----------------------------------------+---------------------------
 Reporter:  davidsarah                  |          Owner:  somebody
     Type:  defect                      |         Status:  new
 Priority:  major                       |      Milestone:  undecided
Component:  code                        |        Version:  1.9.0a1
 Keywords:  windows error GetLastError  |  Launchpad Bug:
----------------------------------------+---------------------------
 We have some code in [source:src/allmydata/windows/fixups.py] and
 [source:src/allmydata/util/fileutil.py] that calls Windows API functions,
 and then calls GetLastError if the API function fails. In theory, the
 Python interpreter could run code in-between on the same thread that
 changes the error code. See [http://bugs.python.org/issue1798].

 (We don't have any code in Tahoe proper that calls C runtime library
 functions, so this issue only affects us for GetLastError, not errno. It
 is somewhat less likely to happen with GetLastError than with errno, at
 least in CPython, but still possible.)

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1531>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list