[Python-checkins] python/dist/src/Python compile.c,2.313,2.314

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Fri Aug 6 21:46:38 CEST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1586

Modified Files:
	compile.c 
Log Message:
SF bug #1004088:   big code objects (>64K) may be optimized incorrectly
Will backport.



Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.313
retrieving revision 2.314
diff -C2 -d -r2.313 -r2.314
*** compile.c	4 Aug 2004 10:26:08 -0000	2.313
--- compile.c	6 Aug 2004 19:46:34 -0000	2.314
***************
*** 380,383 ****
--- 380,388 ----
  		goto exitUnchanged;
  	codestr = memcpy(codestr, PyString_AS_STRING(code), codelen);
+ 
+ 	/* Avoid situations where jump retargeting could overflow */
+ 	if (codelen > 65000)
+ 		goto exitUnchanged;
+ 
  	blocks = markblocks(codestr, codelen);
  	if (blocks == NULL) {



More information about the Python-checkins mailing list