[issue10350] errno is read too late

2011-12-16 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6a966179c73a by Antoine Pitrou in branch '3.2': Issue #10350: Read and save errno before calling a function which might overwrite it. http://hg.python.org/cpython/rev/6a966179c73a New changeset 8e0b2e75ca7a by

[issue10350] errno is read too late

2011-12-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed in 3.x. I won't bother backporting to 2.x. Thank you! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 3.3 -Python 2.7, Python 3.1 ___

[issue10350] errno is read too late

2011-01-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch seems a bit confused at times. For example, you need to restore errno before calling PyErr_SetFromErrno(). Here is a new patch for py3k. -- nosy: +pitrou Added file: http://bugs.python.org/file20281/late_errno.patch

[issue10350] errno is read too late

2011-01-05 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10350 ___ ___

[issue10350] errno is read too late

2010-11-15 Thread Hallvard B Furuseth
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: Terry J. Reedy writes: There is one relocation of memory freeing Modules/timemodule.c does '#if,if(..errno..)' after PyMem_Free(outbuf), which can overwrite the desired errno. Instead of reading errno into a temporary, I moved

[issue10350] errno is read too late

2010-11-12 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: This stuff is hard to write automated tests for, hence there are none. The patch is mostly straightforward: capture errno with new variable err at point of possible error when intervening calculation is needed before testing the value of

[issue10350] errno is read too late

2010-11-08 Thread Hallvard B Furuseth
New submission from Hallvard B Furuseth h.b.furus...@usit.uio.no: errno is sometimes read too late after the error: After another call may have modified it. Here's a patch against py3k. Most of it or a variant applies to 2.7 too, but I haven't really looked at that. I've not looked at math

[issue10350] errno is read too late

2010-11-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10350 ___ ___