3618 Commits

Author SHA1 Message Date
Anthony Baxter
022a55c0d9 update - still some old .cvsignore files lying around 2006-03-23 02:26:07 +00:00
Armin Rigo
2f58855af4 Backport of r41629: hotshot generated half-meaningless numbers since the
introduction of C calls profiling events.
2006-03-20 09:37:16 +00:00
Neal Norwitz
5a8605ec1c Backport 43147:
Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()
returns a non-string when converting %Z.
2006-03-20 02:05:58 +00:00
Georg Brandl
d9ca66f2b2 Backport: Fix missing NULL checks after PyTuple_New, PyList_New, PyDict_New 2006-03-17 19:04:15 +00:00
Neal Norwitz
854e91889f Backport 43037:
Move test code out of xxmodule and into _testcapimodule.c where it belongs.
2006-03-15 05:44:35 +00:00
Neal Norwitz
8a2bffc235 Backport 42932:
Try to be a bit more consistent on all platforms:
 python .
 python < .

both print a message, return non-zero and do not core dump.
This hopefully fixes the failure on Solaris.
2006-03-14 06:47:07 +00:00
Neal Norwitz
9165680203 Backport 43022:
Fix and test (manually w/xx module) passing NULLs to PyObject_Str() and
PyObject_Unicode().  This problem was originally reported from Coverity
and addresses mail on python-dev "checkin r43015".

This inlines the conversion of the string to unicode and cleans
up/simplifies some code at the end of the PyObject_Unicode().

We really need a complete C API test module for all public APIs
and passing good and bad parameter values.
2006-03-14 06:10:22 +00:00
Hye-Shik Chang
b0c3bdde45 Backport from trunk r42989:
Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:24:31 +00:00
Tim Peters
82e8f38434 Merge rev 42904 from the trunk.
_hotshot hotshot_profiler():  If write_header() returned
an error code, this let `self` leak.  This is a disaster
on Windows, since `self` already points to a newly-opened
file object, and it was impossible for Python code to
close the thing since the only reference to it was in a
blob of leaked C memory.

test_hotshot test_bad_sys_path():  This new test provoked
the C bug above.  This test passed, but left an open
"@test" file behind, which caused a massive cascade of
bogus test failures in later, unrelated tests on Windows.
Changed the test code to remove the @test file it leaves
behind, which relies on the change above to close that
file first.
2006-03-11 04:55:45 +00:00
Neal Norwitz
360641c6e3 Backport fixes reported by Coverity. 2006-03-08 06:39:50 +00:00
Hye-Shik Chang
361cd4bd6c Backport r42894: SF #1444030 Fix several potential defects found
by Coverity.
2006-03-07 15:59:09 +00:00
Thomas Wouters
82735da016 Backport trunk's r42890 (thomas.wouters):
Coverity found bug: test result of PyTuple_New() against NULL before use.

and r42891 (thomas.wouters):

Fix gcc 4.0.x warning about use of uninitialized value.
2006-03-07 14:16:02 +00:00
Thomas Wouters
d704935378 Backport trunk's r42888 (thomas.wouters):
Coverity found refleak: need to free 'v' after calling Tkinter_Error().
2006-03-07 14:06:31 +00:00
Thomas Wouters
4fbad67edf Backport trunk's r42885 (thomas.wouters):
Coverity-found bug: don't use temp->next *before* checking it for NULL. Also
return rather than use it again.
2006-03-07 13:39:26 +00:00
Thomas Wouters
e34fc700fc Backport trunk's r42878 (neal.norwitz):
Thanks to Coverity, these were all reported by their Prevent tool.

and r42881 (thomas.wouters):

Don't DECREF a borrowed reference.
2006-03-07 12:08:42 +00:00
Georg Brandl
e5db6b2134 Patch #931938: prevent setting sys.prefix to "" 2006-02-20 17:37:39 +00:00
Georg Brandl
2fc63f7ba6 Bug #854823: socketmodule now builds on Sun platforms even when
INET_ADDRSTRLEN is not defined.
2006-02-20 09:42:37 +00:00
Georg Brandl
465548111d Patch #1352711: make zipimport raise a complete IOError 2006-02-19 09:39:02 +00:00
Georg Brandl
dc2a854b13 Bug #1366000: cleanup BZ2File.seek() logic. Fixes the case of whence=2, offset>=0. 2006-02-18 21:57:28 +00:00
Neal Norwitz
8ef3475bc0 Try to improve name based on discussion on python-checkins with Jim Jewett 2006-02-13 00:37:09 +00:00
Neal Norwitz
3273cb5eee Backport r42314 which fixed Windows breakage when checking that socket
descriptors fit in fd_set.

Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.
Proposed by Tim Peters implemented by Martin von Loewis.
2006-02-12 21:07:17 +00:00
Neal Norwitz
90f1db3d5d Backport:
Bug #876637, prevent stack corruption when socket descriptor
is larger than FD_SETSIZE.

This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE
which is typically only available to root.  Since this wouldn't normally
be run in a test (ie, run as root), it doesn't seem too worthwhile to
add a normal test.  The bug report has one version of a test.  I've
written another.  Not sure what the best thing to do is.

Do the check before calling internal_select() because we can't set
an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.
This seemed the clearest solution.
2006-02-07 07:17:37 +00:00
Neal Norwitz
b5abd16153 Backport:
Patch #1407135, bug #1424041: mmap.mmap(-1, size, ...) can return
  anonymous memory again on Unix.
2006-02-05 06:00:54 +00:00
Neal Norwitz
cd8a8c3586 Backport 42173: get bsddb test_associate to pass with BSDDB 4.1 2006-01-26 05:19:56 +00:00
Neal Norwitz
ebf1dcaeaf Backport:
Fix bug #1413192, fix seg fault in bsddb if a txn was deleted before the env.
2006-01-25 05:29:17 +00:00