433 Commits

Author SHA1 Message Date
Martin v. Löwis
0cc3ea620c Revert the following revisions, as they don't fix security
problems:
52448, 52468, 52472, 52475, 52646, 52797, 52802, 52863, 52999, 53001,
53101, 53371, 53373, 53383, 53384, 53736, 53812, 53921, 55578, 55580,
55581, 55772, 55775, 56557, 57093, 57094, 58630, 60114
2008-03-02 17:47:51 +00:00
Armin Rigo
eff853ccd7 Backport of r52862. 2006-11-29 22:07:38 +00:00
Andrew M. Kuchling
40e0d6f9e5 [Bug #1542016] Report PCALL_POP value. This makes the return value of sys.callstats() match its docstring. 2006-10-27 13:36:16 +00:00
Andrew M. Kuchling
bec63ce9a1 [Backport r46044 | neal.norwitz]
Fix #132 from Coverity, retval could have been derefed
if a continue inside a try failed.
2006-10-06 19:09:36 +00:00
Andrew M. Kuchling
3b93688db6 [Backport r51245 | neal.norwitz]
Move/copy assert for tstate != NULL before first use.
Verify that PyEval_Get{Globals,Locals} returned valid pointers.

Klocwork 231-232
2006-10-04 13:17:42 +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
Brett Cannon
68e4cbbcb6 Return value off PyErr_Warn() for raising string exceptions was not being
checked.  Problem when 'warnings' was set to "error" and thus would re-raise a
new exception.
2006-02-27 23:15:56 +00:00
Georg Brandl
394e4af6d5 Bug #801349: document that start/stop/step slice arguments can be None 2006-02-19 00:12:46 +00:00
Brett Cannon
df7d40861f Cast assignments to `unsigned char *` from PyString_AS_STRING() calls to
silence compiler warnings on gcc 4.0.1 .
2006-02-16 07:01:45 +00:00
Armin Rigo
cb1aea2337 (backport) tracing of C functions: don't call the trace func
with an exception currently set!
2005-09-20 20:53:11 +00:00
Barry Warsaw
190a336331 Fix for SF bug # 900092, hotshot.stats.load assertion failure. This patch
restores the tracing of a 'return' event for exceptions that cause a function
to exit.  Also, update the unit test.

I will port to Python 2.5.
2005-08-15 17:32:56 +00:00
Kurt B. Kaiser
4c79a83e0c Hye-Shik Chang's fix for Bug 875692.
Improve signal handling, especially when using threads, by forcing an early
re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not
cleared by Py_MakePendingCalls().

M Misc/NEWS
M Python/ceval.c
2004-11-23 18:06:08 +00:00
Tim Peters
7f468f29f4 SF patch 1044089: New C API function PyEval_ThreadsInitialized(), by Nick
Coghlan, for determining whether PyEval_InitThreads() has been called.
Also purged the undocumented+unused _PyThread_Started int.
2004-10-11 02:40:51 +00:00
Raymond Hettinger
cfc3192677 SF bug #1014215: Unspecific errors with metaclass
High level error message was stomping useful detailed messages from lower
level routines.

The new approach is to augment string error messages returned by the low
level routines.  The provides both high and low level information.  If
the exception value is not a string, no changes are made.

To see the improved messages in action, type:
   import random
   class R(random): pass
   class B(bool): pass
2004-09-16 16:41:57 +00:00
Martin v. Löwis
87fa785f0f Centralize WITH_TSC processing. 2004-08-29 15:51:52 +00:00
Michael W. Hudson
800ba2375a This is my patch:
[ 1005891 ] support --with-tsc on PPC

plus a trivial change to settscdump's docstring and a Misc/NEWS entry.
2004-08-12 18:19:17 +00:00
Armin Rigo
618fbf5469 This was quite a dark bug in my recent in-place string concatenation
hack: it would resize *interned* strings in-place!  This occurred because
their reference counts do not have their expected value -- stringobject.c
hacks them.  Mea culpa.
2004-08-07 20:58:32 +00:00
Raymond Hettinger
52a21b8e65 SF patch #980695: efficient string concatenation
(Original patch by Armin Rigo).
2004-08-06 18:43:09 +00:00
Michael W. Hudson
a3711f73c1 Fix for the unfortunate fact that PyDict_GetItem and PyObject_GetItem
have differing refcount semantics.  If anyone sees a prettier way to
acheive the same ends, then please go for it.

I think this is the first time I've ever used Py_XINCREF.
2004-08-02 14:50:43 +00:00
Raymond Hettinger
66bd233225 Completed the patch for Bug #215126.
* Fixes an incorrect variable in a PyDict_CheckExact.
* Allow general mapping locals arguments for the execfile() function
  and exec statement.
* Add tests.
2004-08-02 08:30:07 +00:00
Neal Norwitz
93468eac72 Remove unused macros in .c files 2004-07-08 01:49:00 +00:00
Michael W. Hudson
30ea2f223f This closes patch:
[ 960406 ] unblock signals in threads

although the changes do not correspond exactly to any patch attached to
that report.

Non-main threads no longer have all signals masked.

A different interface to readline is used.

The handling of signals inside calls to PyOS_Readline is now rather
different.

These changes are all a bit scary!  Review and cross-platform testing
much appreciated.
2004-07-07 17:44:12 +00:00
Raymond Hettinger
214b1c3aae SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument.
Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing
down the normal case.  My timings so no measurable impact.
2004-07-02 06:41:07 +00:00
Martin v. Löwis
8d97e33bb7 Patch #966493: Cleanup generator/eval_frame exposure. 2004-06-27 15:43:12 +00:00
Raymond Hettinger
a7f56bc0cc Get ceval.c to compile again by moving declarations before other statments. 2004-06-26 04:34:33 +00:00