[issue3311] block operation on closed socket/pipe for multiprocessing

2008-07-06 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _multiprocessing Connection methods don't check if handle is valid or not. If you close the socket/pipe, Python may crash on operations, especially in poll() on FD_SET(...handle, &rdfs). Example of crash: --

[issue3312] bugs in _sqlite module

2008-07-07 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: (A) module_register_adapter() doesn't check microprotocols_add() result, whereas it can fails (eg. dict setitem error). Example: "import _sqlite3; _sqlite3.register_adapter({}, None)" => should raise a TypeError

[issue3313] dlopen() error with no error message from dlerror()

2008-07-07 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Python dl_open() function (from dl module) calls dlopen() and check its result: if it's NULL, it's an error. This is correct if I read the man page. But with an invalid flag value (-1), dlopen() returns NULL but dlerro

[issue3313] dlopen() error with no error message from dlerror()

2008-07-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: As expected, the bug can be reproduced with ctypes.dlopen(). py_dl_open() function of Modules/_ctypes/callproc.c should be merged with Modules/dlmodule.c. Here use at least the attached patch for ctypes (same job than the other patc

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _multiprocessing.Connection() allows to use any positive (or nul) number has socket handle. If you use an invalid file descriptor, poll() method may crash (especially for big positive integer). Example: >>> import _

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- type: -> crash ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3321> ___ ___

[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module

2008-07-08 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: scanstring_str() and scanstring_unicode() functions don't end value whereas it can be outside input string range. A check like this is needed: if (end < 0 || len <= end) { PyErr_SetString(PyExc

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ooops, there is a typo in my last patch: it's "struct stat statbuf;" and not "struct stat *statbuf;"! Here is a new version of the patch. Added file: http://bugs.python.org/file10861/_m

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Valgrind output for Python trunk compiled with pydebug option: ==29848== Invalid read of size 4 ==29848==at 0x809AF61: _Py_ForgetReference (object.c:2044) ==29848==by 0x809AFCF: _Py_Dealloc (object.c:2065) ==29848==by 0x8

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: F*ck, Firefox just crashed! I have to rewrite my long comment... First, to explain why the problem only occurs in pydebug mode: a PyObject has only _ob_next and _ob_prev attributes if Py_TRACE_REFS is set (eg. by pydebug). PyObje

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10828/re_finditer.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10892/_curses_panel.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Other examples of invalid use of PyObject_Del(). Don't apply the patch, i didn't check it. Eg. element_dealloc() should crash if self->tag is NULL... and at line 331, self->tag is NULL whereas I called element_dea

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: About _curses_panel.patch: same as pyobject_del.patch, i didn't tested the code, and is looks like PyCursesPanel_Dealloc() expects that the object is properly initialized. It looks like this bug (invalid use of PyObject_Del/P

[issue3321] _multiprocessing.Connection() doesn't check handle

2008-07-14 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10860/_multiprocessing_connection.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3302] segfault on gettext(None)

2008-07-19 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10945/locale_none-2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3302] segfault on gettext(None)

2008-07-19 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10831/locale_none.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module

2008-07-19 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: To reproduce the crash, try very big negative integer as second argument. Example: >>> _json.scanstring("test", -23492394) Erreur de segmentation (core dumped) >>> _json.scanstring(u"test", -

[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module

2008-07-19 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I wrote that I'm unable to fix the bug correctly, but I wrote a patch to avoid the crash: - replace begin by end in error messages: is it correct? - use "end < 0 || len <= end" test to check scanstring()

[issue1288615] Python code.interact() and UTF-8 locale

2008-08-10 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @kmtracey: Great and thanks! Three years later, the bug is finally fixed :-) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue3553] "2to3 -l" doesn't work when installed in /opt

2008-08-14 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I just installed Python 3.0b2 in /opt/py3k and tried 2to3 tool: $ /opt/py3k/bin/2to3 -l Available transformations for the -f/--fix option: Traceback (most recent call last): File "/opt/py3k/bin/2to3", line 5,

[issue3553] "2to3 -l" doesn't work when installed in /opt

2008-08-14 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file2/2to3_fixer_dir.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3131] 2to3 can't find fixes_dir

2008-08-16 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3131> ___ ___ Python-bugs-list mailing list

[issue3131] 2to3 can't find fixes_dir

2008-08-16 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I reported the same bug with another patch: #3553. I used __import__ and module.__file__ attribute (and not realpath). -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTE

[issue3606] 2to3: commands varible replaced by subprocess

2008-08-19 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I tried 2to3 on my python-ptrace project and with minor changes, it works fine. One of the minor changes is to replace subprocess.split(";") by commands.split(";"). The original code was: commands = command

[issue3610] Fix gdbinit for Python 3.0

2008-08-19 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I'm trying to track down a bug in Python 3.0 (or my program?). I fixed some functions of gdbinit: - pystack and pylocals: use the new function py_printstr - lineno: call CPython "PyCode_Addr2Line" instead of ugly

[issue3611] invalid exception context

2008-08-19 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: After few seconds (30 sec to 5 minutes), my program (Fusil) crashs at: PyEval_EvalFrameEx (f=0x85b4324, throwflag=0) at Python/ceval.c:2459 Py_CLEAR(tstate->exc_traceback); It crashs because tstate->exc_traceback point

[issue3611] invalid exception context

2008-08-19 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The crash is on ProcError exception raising (line 21): 20 except IOError as err: 21 raise ProcError("Unable to open %r: %s" % (filename, --- (gdb) where #0 0x0805bcc7 in PyObject_Hash (v=0x869

[issue3611] invalid exception context

2008-08-19 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I also noticed a crash in PyErr_SetObject(): in block , tstate->exc_value value may changes and so it's possible that tstate->exc_value becomes NULL. I added a test to avoid this crash: Index

[issue3616] shutil.rmtree() fails on invalid filename

2008-08-20 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: If the directory contains invalid filenames (invalid in the system charset), an exception is raised by os.path.join() used by shutil.rmtree(): fullname = os.path.join(path, name) File "/home/haypo/prog/py3k/Lib/posixpat

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-20 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: BufferedWriter from Lib/io.py is thread-safe, but... the Python instruction "with self._write_lock:" could be interrupted when the lock is already acquired. Especially, _lsprof.Profiler() uses ceval hook and is called

[issue3001] RLock's are SLOW

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: As suggested by pitrou, I wrote an implementation of RLock in C. Changes to Python version: - no debug message: i leave the message in #if 0 ... #endif - acquire() method argument "blocking" is not a keyword Notes:

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @pitrou: I wrote an implementation of RLock in C (see #3001). So it would be possible to use threading.RLock instead of threading.Lock ;-) ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Oops, I forgot to update PyInit__Thread() with my new time: - Add PyType_Ready() - Register RLockType to threading dict Here is the new patch -- keywords: +patch Added file: http://bugs.python.org/file11174/rlock

[issue3001] RLock's are SLOW

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Oops, I forgot to update PyInit__Thread() with my new time: - Add PyType_Ready() - Register RLockType to threading dict Here is the new patch. Added file: http://bugs.python.org/file11175/rlock-v2

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-20 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11174/rlock.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ooops again, I uploaded my patch to the wrong issue! The new patch is now in the issue #3001. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3611] invalid exception context

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > How can tstate->exc_value become NULL at that point? [error.c:86] > Could you investigate? PyEval_CallObject(exception, args) may calls PyErr_SetObject(). Since the same thread state is the same, tstate->exc_value al

[issue3611] invalid exception context

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: About the PyEval_CallObject() call in errors.c, here is an example: Call exception<0x81dcee0>(args<0x8751dc4>) with exception= object : type: type refcount: 6 address : 0x81dcee0 and args= objec

[issue3611] invalid exception context

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I'm unable to write a short Python script to reproduce the bug. So download the full program: http://neudorf.hachoir.org/tmp/fusil3000.tar.gz Run in with: $ gdb python3.0 (gdb) run fusil-py

[issue3611] invalid exception context

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: It looks that the problem is that PyErr_SetObject() is not re-entrant. The crash occurs when PyErr_SetObject() is called (indirectly) by PyErr_SetObject(): tstate->exc_value value is changed (set to NULL). As noticed by amaury.fo

[issue3611] invalid exception context

2008-08-20 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Great job amaury! So in ceval, here is the block responsible to clear the execution informations: Index: Python/ceval.c === --- Python/ceval.c (révision 65915) +++

[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-08-20 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _json module of python 3.0 has some bugs. (a) [_json.c] raise_errmsg() calls json.decoder.errmsg() from Python module, but this function may fails. If it fails, error should be be set to NULL. Example: >>&g

[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: If the filename can not be encoded correctly in the system charset, it's not really a problem. The goal is to be able to use open(), shutil.copyfile(), os.unlink(), etc. with the given filename. orig = filename from the ke

[issue3630] Unable to inherit bytes: bytes.__init__() doesn't accept arguments

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Example: class MyBytes(bytes): def __init__(self, *args, **kw): bytes.__init__(self, *args, **kw) a = bytes(b"hello") # ok b = MyBytes(b"hello") # error => DeprecationWarnin

[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I wrote a Filename class. I tries different methods: * no parent class "class Filename: ..." -> I don't know how to make bytes(filename) works!? But it's the best option to avoid strange bugs (mix bytes/str, r

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: So if we consider that RLock is fast enough (see my C version of RLokc in #3001), we can use RLock instead of Lock to avoid this issue. Here is a patch to use RLock and also including an unit test of this issue. Added file

[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I wrote a patch to improve gdbinit (gdb macros): - implement py_decref - reuse pyo in pylocals - direclty call PyCode_Addr2Line() in lineno instead of a long and complex reimplemention in gdb script language - avoid memory l

[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- components: +None type: -> feature request versions: +Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: "pyo" macro from gdbinit (see #3631) uses _PyObject_Dump() to display an object. This function calls (indirectly) string_print() to display one line of text. But if the GIL is released (I guess it's the GIL or is

[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Oh! I have a better idea: why not patching _PyObject_Dump() instead of string_print() :-) So here is a new patch. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11193/pyobject_dump.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11192/string_print.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @skip: oh yes, you're right about the core file :-) So forget the changes in lineno. I first rewrote lineno for Python 3.0 because the code changed and it was easier for me to reuse PyCod

[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Le Thursday 21 August 2008 14:55:43 Antoine Pitrou, vous avez écrit : > > * bytes parent class "class Filename(bytes): ..." -> that's the > > current implementation > > I don't think that

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The bug is not closed :-/ With py3k trunk, I still get a crash. So I added a flag to detect inner calls. Here is an example of inner call backtrace: (gdb) where (...) #2 0xb7df4201 in abort () from /lib/tls/i686/cmov/libc.s

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Here is a new snippet with strange exception handling: - 8< - from gc import collect import _weakref class FuzzingUserClass: pass obj = _weakref.ref(FuzzingUserClass) # Exception n

[issue3634] invalid result value of _weakref.__init__()

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: _weakref.__init__() doesn't catch errors correctly. Example: - 8< - from gc import collect import _weakref class FuzzingUserClass: pass obj = _weakref.ref(FuzzingUserClass) #

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @pitrou: Ok, done (issue #3634). We were right, it's a different bug. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Le Thursday 21 August 2008 18:17:47 Guido van Rossum, vous avez écrit : > The proper work-around is for the app to pass bytes into os.listdir(); > then it will return bytes. In my case, I just would like to remove a di

[issue3638] tkinter.mainloop() is meanling less and crash: remove it

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: mainloop() is a method of a Tkapp object, but it's also a method of _tkinter module. In TkApp_MainLoop, self is seen as a TkappObject whereas it can be a module object! So instruction like "self->dispatch=1" will

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: It's now known that PyErr_SetObject() have to be re-entrant because of the garbage collector interaction. As I wrote in my comments, tstate may be changed during PyEval_CallObject() call. The problem is to known which values

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ok, it was not enough: exc_{type,value,traceback} have to be saved/restored. So here is a new patch. I doesn't change Python behaviour for previous pitrou snippet (msg71658): it doesn't crash here and display two errors. I

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: With my last patch (pyerr_setobject_reentrant-v2.patch) my program works fine! I known that PyErr_SetObject() makes re-entrant calls every ~30 seconds, so the code is tested ;-) ___ Python t

[issue3643] Add more checks to testcapi

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: test_thread_state() doesn't check that the argument is a function and doesn't check function call result and so the exception is catched later: Non callable argument: import _testcapi _testcapi._test_thread_s

[issue3643] Add more checks to testcapi

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Python 3.0 has an new function which requires an extra patch: exception_print() have to check that the argument is an exception instance: >>> import _testcapi >>> _testcapi.exception_print(10) Erreur de s

[issue3643] Add more checks to testcapi

2008-08-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @benjamin.peterson: I know but the module (installed in CPython default installation) is for testing purpose only, but invalid uses of its method would lead to inconsistent CPython internal state and that's bad :-) If you tried

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I implemented the "invalid filename" class feature: - by default, os.listdir() raise an error (UnicodeDecodeError) on invalid filename. The previous behaviour was to return bytes object instead of str. - if invalid_filen

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @gvanrossum: os.unlink() and os.lstat() already accept byte filenames (but open() doesn't). Ok, here is very small patch for posixpath.join() to accept bytes strings. This patch is enough to fix my initial problem (#3616).

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: My last patch (posix_join_bytes.patch) is also enough to fix the initial reported problem: error in posixpath.join() called by os.walk(). I tried os.walk() on a directory with invalid filenames and invalid directory name and it work

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Patch glob.glob() to accept directory with invalid filename (invalid in the filesystem charset): just ignore bytes => str conversion error. Added file: http://bugs.python.org/file11216/glob1_by

[issue3187] os.listdir can return byte strings

2008-08-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: To continue in the "accept bytes filenames" way, a new patch for fnmatch.filter(). Use sys.getfilesystemencoding() to convert the bytes. The patch contains a new unit test. Added file: http://bugs.python.org/file11215/fnm

[issue3643] Add more checks to testcapi

2008-08-23 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @pitrou: This issue is not critical. It's not a bug, it's an enhancement since _testcapi :-) ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue3653] segfault calling sys.excepthook with non-Exception argument

2008-08-24 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3653> ___ ___ Python

[issue3616] shutil.rmtree() fails on invalid filename

2008-08-28 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Python 2.5 has the same problem (at least, on Linux). rmtree() fails if the directory contains invalid unicode string. Backtrace: --- File "shutil.py", line 163, in rmtree fullname = os.path.join(path, name) File "p

[issue3632] use string_print() in gdb

2008-09-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Can anyone review my new patch? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3632> ___ _

[issue3606] 2to3: commands varible replaced by subprocess

2008-09-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ok, no problem. So you can close this (invalid) issue. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3634] invalid result value of _weakref.__init__()

2008-09-08 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The bug and the fix are trivials. Can anyone review my patch? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3634] invalid result value of _weakref.__init__()

2008-09-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Add a test to check to regression. Added file: http://bugs.python.org/file11431/weakref_test.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3634] invalid result value of _weakref.__init__()

2008-09-09 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11434/weakref_test-2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3634] invalid result value of _weakref.__init__()

2008-09-09 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11431/weakref_test.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3634] invalid result value of _weakref.__init__()

2008-09-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: amaury: oh yes, i forget to use assertRaise(). A new patch is attached. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2145] ctypes.util.find_library(): posix .so without SONAME

2008-09-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: You can close this issue. It's not really a bug, it's a feature :-) find_library() only finds library and not programs. libdistorm64.so is compiled as a program, not a library. ___ Python

[issue1297193] Search is to long with regex like ^(.+|dontmatch)*$

2008-09-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: It's not a bug, it's a feature. I wrote a library (http://hachoir.org/wiki/hachoir-regex) to "optimize" regex, so you can close this issue. ___ Python tracker <[EMAIL PROTEC

[issue1755388] Problem with socket.gethostbyaddr() and KeyboardInterrupt

2008-09-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Using gdb, I dig the problem: * when CTRL+c is pressed, signal_handler (sig_num=2) at ./Modules/signalmodule.c:175 is called * signal_handler() stores the signal has a "pending call" * Linux kernel interrupts its name reso

[issue3880] _tkinter._flatten() doesn't check PySequence_Size() error code

2008-09-16 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: PySequence_Size() returns -1 on TypeError (object has no size), but _tkinter._flatten() ignores this error. Here is a patch with a testcase for _tkinter. -- components: Library (Lib) files: _tkinter_flatten.patch keywords:

[issue3885] errors on _bsddb creation and dealloc

2008-09-16 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: I found two differents bugs using Fusil the fuzzer. (1) On db_env_create() error in newDBEnvObject(), self->db_env is not set and so use of this pointer may crashs. (2) DBEnv_dealloc() may raise an exception (DBEnv_close

[issue3885] errors on _bsddb creation and dealloc

2008-09-16 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: About the bug (1): it also occurs in DBEnv_dealloc() but DBEnv_dealloc() is directly called from newDBEnvObject() with Py_DECREF(self);. The two bugs can be reproduces with dummy DBenv() arguments, eg. "DBEnv(92)". Bac

[issue3885] errors on _bsddb creation and dealloc

2008-09-16 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Here is a test to reproduce the crash. I don't know db_env_create() function, so I don't know what are "invalid arguments". So I used ~DB_RPCCLIENT. "gc.collect()" is to detect the bug (2).

[issue3885] errors on _bsddb creation and dealloc

2008-09-17 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > gc.collect() is just a rude way to display this "XXX undetected error". > (Victor: does Fusil check for this? gc.collect() will not fail if there > is another exception in-between, or in debug mode) I stopped to fu

[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: Our application server running on top of Twisted crashs 1 to 3 times per day. It uses a ctypes binding for libnetfilter_conntrack (dump Linux conntrack table) which is running in a dedicated thread. So we get: - Python 2.5.2 - T

[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- type: -> crash ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3900> ___ ___

[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > This is already fixed in SVN, see issue #3554 Oh... cool because next release will fix it, and fuck because it took me hours to found this bug... ___ Python tracker <[EMAIL PROTE

[issue3392] subprocess fails in select when descriptors are large

2008-09-22 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I don't understand the problem. If you open a lot of files, the open() loop will stop an exception (IOError: too many open files), and so subprocess is not used. If I open -1 files, subprocess._get_handles() will fail on os.pi

[issue3001] RLock's are SLOW

2008-09-22 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11172/rlock.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3554] ctypes.wstring_at and string_at call Python API without the GIL

2008-09-23 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Reference to the SVN: - trunk: rev65681 - release25-maint branch: rev65858 -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3885] errors on _bsddb creation and dealloc

2008-09-23 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ok, thanks. My initial bug is closed and my fuzzer is unable to find new ones ;-) Great job. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3885] errors on _bsddb creation and dealloc

2008-09-23 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > Would be nice to use that fuzzer myself. Details, please :). It's not the best place to explain it, so I will try explain shortly: * install fusil 1.0: use mandriva/debian packages, or use sources * (create fusil user grou

[issue3951] Disable Py_USING_MEMORY_DEBUGGER!

2008-09-23 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: In rev 56476, martin.v.loewis enabled Py_USING_MEMORY_DEBUGGER by default in an huge commit: PEP 3123: Provide forward compatibility with Python 3.0, while keeping backwards compatibility. Add Py_Refcnt, Py_Type, Py_Siz

[issue3951] Disable Py_USING_MEMORY_DEBUGGER!

2008-09-23 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11584/obmalloc-no-debug.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

<    33   34   35   36   37   38   39   40   41   42   >