| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
C argument format strings; fixes rest of #1523610.
|
|
|
|
| |
sys.stdin is closed.
|
| |
|
| |
|
|
|
|
|
| |
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
|
|
|
|
|
|
|
|
|
|
|
|
| |
on each iteration. I'm not positive this is the best way to handle
this. I'm also not sure that there aren't other cases where
the lnotab is generated incorrectly. It would be great if people
that use pdb or tracing could test heavily.
Also:
* Remove dead/duplicated code that wasn't used/necessary
because we already handled the docstring prior to entering the loop.
* add some debugging code into the compiler (#if 0'd out).
|
| |
|
|
|
|
|
|
| |
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
|
|
|
|
| |
Also fix a SystemError when trying to assign to yield expressions.
|
|
|
|
|
|
| |
with PEP 302. This was fixed by adding an ``imp.NullImporter`` type that is
used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
excessive filesystem operations during imports.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In general, C doesn't define anything about what happens when
an operation on a signed integral type overflows, and PyOS_strtol()
did several formally undefined things of that nature on signed
longs. Some version of gcc apparently tries to exploit that now,
and PyOS_strtol() could fail to detect overflow then.
Tried to repair all that, although it seems at least as likely to me
that we'll get screwed by bad platform definitions for LONG_MIN
and/or LONG_MAX now. For that reason, I don't recommend backporting
this.
Note that I have no box on which this makes a lick of difference --
can't really test it, except to note that it didn't break anything
on my boxes.
Silent change: PyOS_strtol() used to return the hard-coded 0x7fffffff
in case of overflow. Now it returns LONG_MAX. They're the same only on
32-bit boxes (although C doesn't guarantee that either ...).
|
|
|
|
|
| |
Also add a guard against NULL in converttuple and add a test case
(that previously would have crashed).
|
|
|
|
| |
will backport.
|
|
|
|
|
|
| |
to stackdepth_walk it will be dereffed.
Not sure if I found with failmalloc or Klockwork #55.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Many (all?) of these could be backported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved the code for _PyThread_CurrentFrames() up, so it's no longer
in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in
one).
Changed test_sys's test_current_frames() so it passes with or without
thread supported compiled in.
Note that test_sys fails when Python is compiled without threads,
but for an unrelated reason (the old test_exit() fails with an
indirect ImportError on the `thread` module). There are also
other unrelated compilation failures without threads, in extension
modules (like ctypes); at least the core compiles again.
Do we really support --without-threads? If so, there are several
problems remaining.
|
|
|
|
|
|
| |
v2 can be NULL if exception2 is NULL. I don't think that condition can happen,
but I'm not sure it can't either. Now the code will protect against either
being NULL.
|
|
|
|
| |
Reported by Klocwork, #98.
|
|
|
|
| |
had more than 255 blank lines. Byte codes need to go first, line #s second.
|
| |
|
|
|
|
| |
impact of changing the MAGIC #.
|
| |
|
| |
|
|
|
|
|
|
| |
branch into the trunk. This adds a new sys._current_frames()
function, which returns a dict mapping thread id to topmost
thread stack frame.
|
|
|
|
| |
started after line 256.
|
|
|
|
| |
rather than longs. This also fixes the test for eval(-sys.maxint - 1).
|
| |
|
| |
|
| |
|
|
|
|
| |
contains only the changes related to leaking the copy variable.
|
|
|
|
| |
and atof().
|
|
|
|
|
|
| |
omit a default "error" argument for NULL pointer. This allows
the parser to take a codec from cjkcodecs again.
(Reported by Taewook Kang and reviewed by Walter Doerwald)
|
|
|
|
|
|
|
|
|
|
| |
Heavily revised, comprising revisions:
46640 - original trunk revision (backed out in r46655)
46647 - markup fix (backed out in r46655)
46692:46918 merged from branch aimacintyre-sf1454481
branch tested on buildbots (Windows buildbots had problems
not related to these changes).
|
| |
|
|
|
|
| |
at the NeedForSpeed sprint.
|
| |
|
|
|
|
|
|
| |
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
|
|
|
|
|
| |
Actually, checking for INT_MAX and INT_MIN is correct since
the format code explicitly handles a C "int".
|
|
|
|
| |
checking.
|
|
|
|
|
|
|
|
| |
exact maximum size someone guesses is needed. In this case, if
we're really worried about extreme integers, then "cp%d" can
actually need 14 bytes (2 for "cp" + 1 for \0 at the end +
11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is
actually saved by making a stack-local buffer tiny.
|
|
|
|
|
|
| |
top of 10 possible digits for an int.
Closes bug #1501223.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
46640 Patch #1454481: Make thread stack size runtime tunable.
46647 Markup fix
The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them. See python-dev discussion.
Note that a branch can (and should) be created for resolving these
problems, like
svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH
followed by merging rev 46647 to the new branch.
|
|
|
|
| |
(thanks to Neal for review)
|
| |
|
| |
|
|
|
|
| |
[ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
|