Issue1608818
Created on 2006-12-04 22:34 by sdeibel, last changed 2008-07-16 21:31 by georg.brandl.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
proposed-patch.txt
|
sdeibel,
2006-12-04 22:34
|
Possible less brittle way to implement this |
|
|
|
fix-unicode-listdir.patch
|
duaneg,
2008-06-04 13:11
|
Fixed and tested version of original proposed patch |
|
|
|
msg30743 - (view) |
Author: Stephan R.A. Deibel (sdeibel) |
Date: 2006-12-04 22:34 |
|
In the Linux/Unix (non-Windows / non-OS2) implementation of listdir() in posixmodule.c, a check for errno != 0 is done after the loop. This assumes that errno is only set by readdir() but in fact it's possible for it to be set in PyUnicode_FromEncodedObject() if codecs are used in the conversion (actually that's a separate bug I'll report when I've investigated it futher).
To tighten this up, I'd recommend moving the errno != 0 clause in its entirety to just after the readdir() call and possibly resetting errno=0 before the readdir() call so it's clear the error really happened there.
I've attached a possible patch for this.
|
|
msg67690 - (view) |
Author: Duane Griffin (duaneg) |
Date: 2008-06-04 13:11 |
|
This bug hit one of our (Gentoo) users, causing random failures when
running emerge (Gentoo's package management tool). See the bug report
here for more information: http://bugs.gentoo.org/show_bug.cgi?id=218378
Unfortunately the patch given previously is slightly broken. Please find
attached a working version that has survived testing and fixes the
problem for the bug reporter.
|
|
msg68983 - (view) |
Author: Rafael Zanella (zanella) |
Date: 2008-06-30 01:12 |
|
Related/Similar: #3115
|
|
msg69840 - (view) |
Author: Georg Brandl (georg.brandl) |
Date: 2008-07-16 21:31 |
|
Fixed in r65037.
|
|
| Date |
User |
Action |
Args |
| 2008-07-16 21:31:51 | georg.brandl | set | status: open -> closed nosy:
+ georg.brandl resolution: fixed messages:
+ msg69840 |
| 2008-06-30 01:12:18 | zanella | set | nosy:
+ zanella messages:
+ msg68983 |
| 2008-06-04 20:53:35 | georg.brandl | set | versions:
+ Python 2.6, Python 3.0 nosy:
+ loewis priority: normal -> high assignee: loewis components:
+ Extension Modules, - Library (Lib) keywords:
+ easy type: crash |
| 2008-06-04 20:38:46 | schmir | set | nosy:
+ schmir |
| 2008-06-04 13:11:08 | duaneg | set | files:
+ fix-unicode-listdir.patch keywords:
+ patch messages:
+ msg67690 nosy:
+ duaneg |
| 2006-12-04 22:34:06 | sdeibel | create | |
|