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 2012年12月06日 11:17 by serhiy.storchaka, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| glob_magic_in_drive.patch | serhiy.storchaka, 2012年12月14日 18:21 | review | ||
| glob_magic_in_drive_test.patch | serhiy.storchaka, 2012年12月15日 21:36 | Test for 3.x | review | |
| glob_magic_in_drive_test-2.7_2.patch | serhiy.storchaka, 2012年12月15日 22:31 | Test for 2.7 | review | |
| glob_magic_in_drive_2.patch | serhiy.storchaka, 2012年12月16日 09:03 | review | ||
| Messages (13) | |||
|---|---|---|---|
| msg177038 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年12月06日 11:17 | |
glob.glob() can fall in infinite recursion (causing stack overflow) on Windows with patterns which contains metacharacters in drive or UNC path ('*:foo', r'\\?\c:\bar'). This is my assumption, someone should confirm it on Windows.
Here is a patch, which fix an infinite recursion.
|
|||
| msg177480 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年12月14日 17:55 | |
Patch contains unrelated changes. |
|||
| msg177486 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年12月14日 18:21 | |
> Patch contains unrelated changes. Sorry, my fault. Here is a cleaned patch. |
|||
| msg177557 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年12月15日 20:04 | |
How about adding a test? |
|||
| msg177565 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年12月15日 21:36 | |
I have made the test, but I can't run it. Therefore I can't guarantee that the test works. |
|||
| msg177568 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年12月15日 22:24 | |
Tests work fine under 3.x, but under 2.7 I get: ====================================================================== FAIL: test_glob_magic_in_drive (test.test_glob.GlobTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\t\cpython\lib\test\test_glob.py", line 117, in test_glob_magic_in_dri ve eq(glob.glob('\\\\?\\c:\\'), ['\\\\?\\c:\\']) File "C:\t\cpython\lib\test\test_glob.py", line 48, in assertSequencesEqual_no order self.assertEqual(set(l1), set(l2)) AssertionError: Items in the second set but not the first: '\\\\?\\c:\\' |
|||
| msg177569 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年12月15日 22:31 | |
Ah, I forgot that splitdrive() on 2.7 does not work with UNC paths. Here is an updated patch. |
|||
| msg177570 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年12月15日 22:40 | |
Thank you, the new test works fine. |
|||
| msg177582 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年12月16日 09:03 | |
Patch updated with clarified comments. Are the tests fail on non-fixed Python? |
|||
| msg177583 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年12月16日 10:03 | |
> Patch updated with clarified comments. > > Are the tests fail on non-fixed Python? Yes, they do. |
|||
| msg177593 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年12月16日 12:55 | |
New changeset 4af260a54e05 by Antoine Pitrou in branch '3.2': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/4af260a54e05 New changeset b90aa7f66e4a by Antoine Pitrou in branch '3.3': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/b90aa7f66e4a New changeset bfb39fb93af7 by Antoine Pitrou in branch 'default': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/bfb39fb93af7 |
|||
| msg177594 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年12月16日 12:57 | |
New changeset b0935ef48186 by Antoine Pitrou in branch '2.7': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/b0935ef48186 |
|||
| msg177595 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年12月16日 12:58 | |
Patches now committed, thank you ! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:39 | admin | set | github: 60830 |
| 2012年12月16日 12:58:03 | pitrou | set | status: open -> closed resolution: fixed messages: + msg177595 stage: patch review -> resolved |
| 2012年12月16日 12:57:33 | python-dev | set | messages: + msg177594 |
| 2012年12月16日 12:55:59 | python-dev | set | nosy:
+ python-dev messages: + msg177593 |
| 2012年12月16日 10:03:02 | pitrou | set | messages: + msg177583 |
| 2012年12月16日 09:03:57 | serhiy.storchaka | set | files:
+ glob_magic_in_drive_2.patch messages: + msg177582 |
| 2012年12月15日 22:40:47 | pitrou | set | messages: + msg177570 |
| 2012年12月15日 22:32:03 | serhiy.storchaka | set | files: - glob_magic_in_drive_test-2.7.patch |
| 2012年12月15日 22:31:24 | serhiy.storchaka | set | files:
+ glob_magic_in_drive_test-2.7_2.patch messages: + msg177569 |
| 2012年12月15日 22:24:36 | pitrou | set | messages: + msg177568 |
| 2012年12月15日 21:40:10 | serhiy.storchaka | set | files: + glob_magic_in_drive_test-2.7.patch |
| 2012年12月15日 21:36:38 | serhiy.storchaka | set | files:
+ glob_magic_in_drive_test.patch messages: + msg177565 |
| 2012年12月15日 20:04:18 | pitrou | set | nosy:
+ pitrou messages: + msg177557 |
| 2012年12月14日 18:22:08 | serhiy.storchaka | set | files: - glob_magic_in_drive.patch |
| 2012年12月14日 18:21:07 | serhiy.storchaka | set | files:
+ glob_magic_in_drive.patch messages: + msg177486 |
| 2012年12月14日 17:55:59 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg177480 |
| 2012年12月06日 11:17:19 | serhiy.storchaka | create | |