summaryrefslogtreecommitdiff
path: root/Parser
AgeCommit message (Collapse)AuthorLines
2008-03-02Backport of r60793:Martin v. Löwis-0/+3
Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code.
2006-10-06[Backport r46602 | neal.norwitz]Andrew M. Kuchling-8/+15
Patch #1357836: Prevent an invalid memory read from test_coding in case the done flag is set. In that case, the loop isn't entered. I wonder if rather than setting the done flag in the cases before the loop, if they should just exit early. This code looks like it should be refactored. Backport candidate (also the early break above if decoding_fgets fails)
2006-10-05[Backport r51222 | neal.norwitz -- if you hack the code to set r=NULL,Andrew M. Kuchling-0/+6
you find that Python does print "MemoryError". There's no traceback and no indication of which line of code is responsible, but it's better than a segfault.] Handle NULL nodes while parsing. I'm not entirely sure this is correct. There might be something else that needs to be done to setup the error. Klocwork #295.
2006-10-03[Backport r51256 | neal.norwitz]Andrew M. Kuchling-0/+4
Handle malloc failure. Klocwork 281
2006-09-29[Backport rev39767 by nnorwitz]Andrew M. Kuchling-0/+3
Free coding spec (cs) if there was an error to prevent mem leak. Maybe backport candidate. [Bugfix seems applicable to 2.4 to me. --amk]
2006-03-23update - still some old .cvsignore files lying aroundAnthony Baxter-3/+0
2006-03-07Backport r42894: SF #1444030 Fix several potential defects foundHye-Shik Chang-0/+2
by Coverity.
2006-02-21Backport 41753:Neal Norwitz-0/+6
Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter. Also bug #1435487 (dup).
2005-07-12Backport checkin:Walter Dörwald-27/+45
Apply SF patch #1101726: Fix buffer overrun in tokenizer.c when a source file with a PEP 263 encoding declaration results in long decoded line.
2005-04-07Backport my recent raw_input() vs no threads build vs SIGINT argh:Michael W. Hudson-0/+4
In a threads-disabled build, typing Ctrl-C into a raw_input() crashed, because (essentially) I didn't realise that PY_BEGIN/END_ALLOW_THREADS actually expanded to nothing under a no-threads build, so if you somehow NULLed out the threadstate (e.g. by calling PyThread_SaveThread) it would stay NULLed when you return to Python. Argh!
2004-10-13Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter-13/+4
a few remaining calls to signal() were converted to PyOS_setsig().
2004-08-04SF #941229: Decode source code with sys.stdin.encoding in interactiveHye-Shik Chang-0/+61
modes like non-interactive modes. This allows for non-latin-1 users to write unicode strings directly and sets Japanese users free from weird manual escaping <wink> in shift_jis environments. (Reviewed by Martin v. Loewis)
2004-08-02PEP-0318, @decorator-style. In Guido's words:Anthony Baxter-0/+2
"@ seems the syntax that everybody can hate equally" Implementation by Mark Russell, from SF #979728.
2004-07-08PyThreadState_Swap(NULL) didn't do what I thought it did. FixesMichael W. Hudson-1/+1
[ 987287 ] Python 2.4a1, interpreter hanging on Keyboard Interrupt
2004-07-08Pass the flags along, rather than ignoring them. Backport candidateNeal Norwitz-1/+1
2004-07-07"#if WITH_THREAD" is incorrect; must be #ifdef instead; WITH_THREADTim Peters-4/+4
isn't always set to an integer value when it's defined.
2004-07-07This closes patch:Michael W. Hudson-3/+38
[ 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-06-29[Patch #974633] Check PyObject_MALLOC return for errorAndrew M. Kuchling-0/+4
2004-03-20Fix for SF 780407.Guido van Rossum-1/+1
Change %08l to %p to print a pointer. Will backport to 2.3.
2004-02-07Remove support for --without-universal-newlines (see PEP 11).Skip Montanaro-2/+0
2003-12-15Remove a "temporary" piece of code that was probably unneeded sinceGuido van Rossum-7/+0
mid 1990. Remove an untrue XXX comment.
2003-11-20Talk about old code: removed a reference to THINK_C.Jack Jansen-30/+0
2003-11-20Getting rid of all the code inside #ifdef macintosh too.Jack Jansen-28/+0
2003-11-19Getting rid of support for the ancient Apple MPW compiler.Jack Jansen-24/+0
2003-06-17SF bug 751956: graminit.[ch] don't build on windowsTim Peters-1/+4
A change from Duncan Booth, to deal with changes in the way pgen gets built. Note that graminit.[ch] aren't normally built on Windows (they're obtained from CVS).
2003-05-10Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis-0/+4
riscospath.extsep, and use os.extsep throughout.
2003-05-03Patch #708495: Port more stuff to OpenVMS.Martin v. Löwis-0/+8
2003-04-29Remove file that was moved to ../IncludeGuido van Rossum-18/+0
2003-04-17Changes from Jonathan Riehl to allow his pgen extension (PEP 269) toGuido van Rossum-5/+34
work. This includes some more code that used to be part of pgen in the main parser; I'm okay with that. I'll see if the Windows build needs work next.
2003-02-28compile_atom(): Neal's last checkin removing the setting of i brokeBarry Warsaw-0/+3
the build, so I'm restoring it. I'm not sure what Neal's intent was, since the line following the one he removed was "REQN(i, 1)" so i is obviously used. ;)
2003-02-28Remove setting i since it isn't used. Found in unrelated bug 690012.Neal Norwitz-3/+0
2003-02-17Add URL for PEP to the source code encoding warning.Marc-André Lemburg-6/+12
Remove the usage of PyErr_WarnExplicit() since this could cause sensitive information from the source files to appear in e.g. log files.
2003-02-13- Finally fixed the bug in compile() and exec where a string endingGuido van Rossum-0/+9
with an indented code block but no newline would raise SyntaxError. This would have been a four-line change in parsetok.c... Except codeop.py depends on this behavior, so a compilation flag had to be invented that causes the tokenizer to revert to the old behavior; this required extra changes to 2 .h files, 2 .c files, and 2 .py files. (Fixes SF bug #501622.)
2003-02-09patch 680474 that fixes bug 679880: compile/eval/exec refused utf-8 bomJust van Rossum-2/+2
mark. Added unit test.
2003-01-14Fix [ 665014 ] files with long lines and an encoding crash.Mark Hammond-1/+2
Ensure that the 'size' arg is correctly passed to the encoding reader to prevent buffer overflows.
2002-12-11Constify filenames and scripts. Fixes #651362.Martin v. Löwis-12/+14
2002-11-02Fix compiler warning on HP-UX.Neal Norwitz-2/+2
Cast param to isalnum() to int.
2002-10-27Change PyOS_Readline declaration to match the recent change to myreadline.cSkip Montanaro-2/+2
(see Patch 512981). I changed stdin to sys_stdin in the body of the function, but did not change stderr to sys_stdout, though I suspect that may be the correct course. I don't know the code involved well enough to judge.
2002-10-26Patch #512981: Update readline input stream on sys.stdin/out change.Martin v. Löwis-10/+22
2002-09-03Removed reliance on gcc/C99 extension.Tim Peters-1/+3
2002-09-03Ignore encoding declarations inside strings. Fixes #603509.Martin v. Löwis-1/+17
2002-08-16Squash a few calls to the hideously expensive PyObject_CallObject(o,a)Guido van Rossum-3/+14
-- replace then with slightly faster PyObject_Call(o,a,NULL). (The difference is that the latter requires a to be a tuple; the former allows other values and wraps them in a tuple if necessary; it involves two more levels of C function calls to accomplish all that.)
2002-08-15provide less mysterious error messages when seeing end-of-line inSkip Montanaro-3/+6
single-quoted strings or end-of-file in triple-quoted strings. closes patch 586561.
2002-08-07Use Py_FatalError instead of abort.Martin v. Löwis-2/+3
2002-08-07Fix PEP 263 code --without-unicode. Fixes #591943.Martin v. Löwis-0/+18
2002-08-05Added a cast to shut up a compiler warning.Jack Jansen-1/+1
2002-08-05Add 1 to lineno in deprecation warning. Fixes #590888.Martin v. Löwis-1/+3
2002-08-04Make pgen compile with pydebug. Duplicate normalized names, as it mayMartin v. Löwis-2/+8
be longer than the old string.
2002-08-04Group statements properly.Martin v. Löwis-6/+12
2002-08-04Repaired a fatal compiler error in the debug build: it's not clear whatTim Peters-1/+1
this was trying to assert, but the name it referenced didn't exist.