[issue9185] os.getcwd causes infinite loop on solaris
Stefan Krah
report at bugs.python.org
Tue Jul 13 18:50:18 CEST 2010
Stefan Krah <stefan-usenet at bytereef.org> added the comment:
OpenBSD has the same getcwd() bug. It was uncovered by raising current_path_length
to 4099 in test_posix.
Here is a new patch that enables the changed posix_getcwd() function
on Solaris and OpenBSD only. I've tested the patch on Linux, OpenSolaris,
OpenBSD and FreeBSD.
So far, there are three categories of behavior if PATH_MAX is exceeded:
1) Solaris, OpenBSD: buggy, getcwd() keeps returning NULL/ERANGE.
2) Linux: getcwd() returns NULL/ENAMETOOLONG.
3) FreeBSD: getcwd() returns SUCCESS/0.
So FreeBSD is one of the systems that benefits from principally
unlimited path lengths (though I doubt it is used much).
I think the changes in the unit test handle all categories well,
and perhaps they will uncover more problem systems.
----------
Added file: http://bugs.python.org/file17989/issue9185-2.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9185>
_______________________________________
More information about the Python-bugs-list
mailing list