[Python-checkins] r42884 - python/trunk/Modules/posixmodule.c

Guido van Rossum guido at python.org
Tue Mar 7 21:37:05 CET 2006


On 3/7/06, Thomas Heller <theller at python.net> wrote:
> Georg Brandl wrote:
> > Thomas Heller wrote:
> >> georg.brandl wrote:
> >>> Author: georg.brandl
> >>> Date: Tue Mar  7 13:48:03 2006
> >>> New Revision: 42884
> >>>
> >>> Modified:
> >>>    python/trunk/Modules/posixmodule.c
> >>> Log:
> >>> Bug #1432525: os.listdir now releases the GIL while calling
> >>> readdir().
> >> This checkin broke os.listdir().  It returns an empty list now in most cases,
> >> on Windows XP at least.
> >
> > Could you help me find the cause? I'm not able to see why this should change
> > the behavior of listdir().
> >
> > Georg
> First, 'result' may be uninitialized in the
>     do { } while(result == TRUE);
> loop ending on line 1756 when the 'continue' in the loop has been executed.
> Since result is not 'TRUE' in most cases, the function returns not finding
> any files.
>
> When I initialize result to TRUE at the top of the function, it gets worse.
> because the 'continue' statement keeps looping forever.
>
> Hope that helps (sorry I don't have time to fix this myself).

This suggests that the checked-in code is hopelessly broken. Rolling
back is probably the best course of action at this point.

What was the motivation anyway?

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-checkins mailing list