[Python-checkins] python/dist/src/Python compile.c, 2.291.6.2, 2.291.6.3

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Fri Aug 6 23:29:25 CEST 2004


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

Modified Files:
      Tag: release23-maint
	compile.c 
Log Message:
Backport SF bug #1004088:   
    big code objects (>64K) may be optimized incorrectly



Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.291.6.2
retrieving revision 2.291.6.3
diff -C2 -d -r2.291.6.2 -r2.291.6.3
*** compile.c	22 Sep 2003 04:41:21 -0000	2.291.6.2
--- compile.c	6 Aug 2004 21:29:22 -0000	2.291.6.3
***************
*** 346,349 ****
--- 346,353 ----
  	assert(PyTuple_Check(consts));
  
+ 	/* Avoid situations where jump retargeting could overflow */
+ 	if (codelen > 65000)
+ 		goto exitUnchanged;
+ 
  	for (i=0 ; i<codelen-7 ; i += HAS_ARG(codestr[i]) ? 3 : 1) {
  		opcode = codestr[i];



More information about the Python-checkins mailing list