[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

Heejin report at bugs.python.org
Thu Aug 12 13:02:39 CEST 2010

New submission from Heejin <aheejin at gmail.com>:

As far as I have seen, this bug only appears in Windows 7. I tested with Python 2.5, 2.6, and 2.7 and they all seem to have this bug.
I tested with Windows 7 Korean version. I'm not sure if other language versions have the same problem.

Reproduction steps:

1. Run a command shell 'cmd'.

2. Run following commands in order:
cd c:\
mkdir rpcc\build
cd rpcc\build
mkdir customs\llvm2dre\llvm-2.6\tools\clang\test\CXX\over\over.match\over.match.best\over.best.ics\over.ics.ellipsis\.svn\tmp\prop-base

3. Create a python script file temp.py with the contents below
import os
path = 'customs\\llvm2dre\\llvm-2.6\\tools\\clang\\test\\CXX\\over\\over.match\\over.match.best\\over.best.ics\\over.ics.ellipsis\\.svn\\tmp\\prop-base'
(I attached this file in this post)

4. Run the script.
python temp.py

5. Then you can see it crashes.

components: Library (Lib), Windows
files: temp.py
messages: 113672
nosy: aheejin
priority: normal
severity: normal
status: open
title: os.listdir() crashes on some long and deep paths in Windows 7
type: crash
versions: Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file18483/temp.py

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list