[issue1608818] Sloppy error checking in listdir() for Posix

2008-06-04 Thread Duane Griffin

Duane Griffin <[EMAIL PROTECTED]> added the comment:

This bug hit one of our (Gentoo) users, causing random failures when
running emerge (Gentoo's package management tool). See the bug report
here for more information: http://bugs.gentoo.org/show_bug.cgi?id=218378

Unfortunately the patch given previously is slightly broken. Please find
attached a working version that has survived testing and fixes the
problem for the bug reporter.

--
keywords: +patch
nosy: +duaneg
Added file: http://bugs.python.org/file10517/fix-unicode-listdir.patch

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1608818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39345] Py_Initialize Hangs on Windows 10

2021-06-08 Thread Duane Griffin


Duane Griffin  added the comment:

I can reproduce this on Windows 10 with Python 3.9. See attached source. At 
least for us, it is hanging when one thread is doing a read on the file 
descriptor while a second calls Py_Initialize (or just dup directly).

The windows kernel call stack shows the dup call is waiting on a critical 
section, while the thread reading from stdin is waiting in ReadFile. I can get 
a full stack trace from WinDbg if it is helpful, but hopefully the attached 
code should be enough to reproduce the problem at will for anyone interested.

If stdin is receiving input, or is closed, then the read call will complete and 
unblock dup in due course. However if not then it will hang indefinitely.

If we can fix this to work reliably in Python that would be great. Otherwise, 
or in the meantime, we could just add a note to the documentation. We are going 
to try and work-around it by using a different file descriptor instead of 
stdin. Other applications might be able to avoid IO using stdin until after 
python is initialised.

--
nosy: +duaneg
Added file: https://bugs.python.org/file50099/dup-hang.c

___
Python tracker 
<https://bugs.python.org/issue39345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17582] xml.etree.ElementTree does not preserve whitespaces in attributes

2015-09-03 Thread Duane Griffin

Duane Griffin added the comment:

Here is a patch with a unit test for the new escaping functionality. I believe 
it covers all the new cases. Additional code is not required for cElementTree 
as the serialisation code is all Python.

--
nosy: +duaneg
Added file: http://bugs.python.org/file40346/17582-etree-whitespace-test.patch

___
Python tracker 
<http://bugs.python.org/issue17582>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Duane Griffin added the comment:

I cannot reproduce the segfaults for the first four issues however valgrind 
still reports problems for all but the second. The fifth (last) one still 
segfaults.

I have a patch for the fifth issue. The other remaining issues are all 
reporting the same invalid read at exit. I'm not sure whether that is the same 
issue reported here or something else that they all trigger:

Invalid read of size 8
at 0x43C5FA: delete_garbage (gcmodule.c:868)
by 0x43C5FA: collect (gcmodule.c:1019)
by 0x43D2F0: _PyGC_CollectNoFail (gcmodule.c:1623)
by 0x55D95E: PyImport_Cleanup (import.c:420)
by 0x4224E5: Py_FinalizeEx.part.3 (pylifecycle.c:612)
by 0x43B0CB: Py_Main (main.c:798)
by 0x41DC71: main (python.c:69)

--
keywords: +patch
nosy: +duaneg
Added file: 
http://bugs.python.org/file44573/0001-Issue-27945-fix-dictiter_iternextitem-use-after-free.patch

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Duane Griffin added the comment:

Apologies: compiling python with --with-pydebug all of these issues are 
reproducible on head after all. Furthermore while my patch fixes the reported 
crash it still crashes on exit:

Program received signal SIGSEGV, Segmentation fault.
0x00437193 in visit_decref (op=0x768a4c98, data=0x0) at 
Modules/gcmodule.c:374
374 if (PyObject_IS_GC(op)) {
(gdb) bt
#0  0x00437193 in visit_decref (op=0x768a4c98, data=0x0) at 
Modules/gcmodule.c:374
#1  0x004a9112 in tupletraverse (o=0x768a49f8, visit=0x43716d 
, arg=0x0) at Objects/tupleobject.c:571
#2  0x0043690a in subtract_refs (containers=containers@entry=0x87cda0 
) at Modules/gcmodule.c:399
#3  0x00437ac3 in collect (generation=generation@entry=2, 
n_collected=n_collected@entry=0x7fffd838, 
n_uncollectable=n_uncollectable@entry=0x7fffd840, 
nofail=nofail@entry=0) at Modules/gcmodule.c:956
#4  0x00437f57 in collect_with_callback (generation=generation@entry=2) 
at Modules/gcmodule.c:1128
#5  0x004383a6 in PyGC_Collect () at Modules/gcmodule.c:1592
#6  0x004383cf in _PyGC_CollectIfEnabled () at Modules/gcmodule.c:1605
#7  0x00420c76 in Py_FinalizeEx () at Python/pylifecycle.c:603
#8  0x0043682b in Py_Main (argc=argc@entry=2, argv=argv@entry=0x90d010) 
at Modules/main.c:798
#9  0x0041d153 in main (argc=2, argv=0x7fffdae8) at 
./Programs/python.c:69

--

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Duane Griffin added the comment:

Fix for the first issue: with this fix there is no segfault or valgrind issue 
reported on during execution or on exit.

--
Added file: 
http://bugs.python.org/file44579/0001-Issue-27945-fix-PyDict_MergeFromSeq2-use-after-free.patch

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Duane Griffin added the comment:

Fix for the second issue: with this fix there is no segfault or valgrind issue 
reported on during execution or on exit.

--
Added file: 
http://bugs.python.org/file44582/0001-Issue-27945-fix-dictitems_contains-use-after-free.patch

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Duane Griffin added the comment:

Ah, my first fix (for the fifth issue) was incomplete. Please see attached 
patch which I think correctly fixes the problem.

--
Added file: 
http://bugs.python.org/file44585/0001-Issue-27945-fix-dictiter_iternextitem-use-after-free.patch

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Changes by Duane Griffin :


Removed file: 
http://bugs.python.org/file44573/0001-Issue-27945-fix-dictiter_iternextitem-use-after-free.patch

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27945] Various segfaults with dict

2016-09-11 Thread Duane Griffin

Duane Griffin added the comment:

Note that I think most or all of these issues apply to 2.7 and while I didn't 
do a proper check I think the fixes also apply.

--

___
Python tracker 
<http://bugs.python.org/issue27945>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28024] fileinput causes RecursionErrors when dealing with large numbers of empty files

2016-09-12 Thread Duane Griffin

Duane Griffin added the comment:

This was fixed in 2.7, 3.5 and head when #15068 was fixed.

--
nosy: +duaneg, serhiy.storchaka

___
Python tracker 
<http://bugs.python.org/issue28024>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27482] heap-buffer-overflow on address 0x6250000078ff

2016-09-13 Thread Duane Griffin

Duane Griffin added the comment:

There are a couple of places where the tokenizer code is not correctly handling 
\0 characters occurring at the start of the buffer. Patch attached.

--
keywords: +patch
nosy: +duaneg
Added file: 
http://bugs.python.org/file44646/0001-Issue-27482-handle-nul-characters-while-reading-inpu.patch

___
Python tracker 
<http://bugs.python.org/issue27482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com