Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 154963 Details for
Bug 218378
os.listdir fails with random "cannot allocate memory" errors
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
python-2.5.2-unicode-listdir.patch
python-2.5.2-unicode-listdir.patch (text/plain), 851 bytes, created by
Duane Griffin
on 2008-05-31 15:56:58 UTC
(
hide
)
Description:
python-2.5.2-unicode-listdir.patch
Filename:
MIME Type:
Creator:
Duane Griffin
Created:
2008-05-31 15:56:58 UTC
Size:
851 bytes
patch
obsolete
>--- Modules/posixmodule.c.orig 2008-02-03 07:20:39.000000000 +0000 >+++ Modules/posixmodule.c 2008-05-31 16:24:54.000000000 +0100 >@@ -2179,11 +2179,19 @@ > return NULL; > } > for (;;) { >+ errno = 0; > Py_BEGIN_ALLOW_THREADS > ep = readdir(dirp); > Py_END_ALLOW_THREADS >- if (ep == NULL) >- break; >+ if (ep == NULL) { >+ if (errno == 0) { >+ break; >+ } else { >+ closedir(dirp); >+ Py_DECREF(d); >+ return posix_error_with_allocated_filename(name); >+ } >+ } > if (ep->d_name[0] == '.' && > (NAMLEN(ep) == 1 || > (ep->d_name[1] == '.' && NAMLEN(ep) == 2))) >@@ -2220,12 +2228,6 @@ > } > Py_DECREF(v); > } >- if (errno != 0 && d != NULL) { >- /* readdir() returned NULL and set errno */ >- closedir(dirp); >- Py_DECREF(d); >- return posix_error_with_allocated_filename(name); >- } > closedir(dirp); > PyMem_Free(name); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 218378
:
150265
|
150266
|
150362
|
153911
|
153913
|
153949
|
154619
| 154963