This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2006年12月04日 22:34 by sdeibel, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| 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 | ||
| Messages (4) | |||
|---|---|---|---|
| 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) * (Python committer) | Date: 2008年07月16日 21:31 | |
Fixed in r65037. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:21 | admin | set | github: 44304 |
| 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 | |