[Python-bugs-list] [ python-Bugs-488687 ] UMR when assign to __debug__

noreply@sourceforge.net noreply@sourceforge.net
Mon, 03 Dec 2001 17:42:40 -0800


Bugs item #488687, was opened at 2001-12-03 17:29
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=488687&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
>Priority: 7
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: UMR when assign to __debug__

Initial Comment:
When doing:

  __debug__ = None

(like in test_compile)

The line number (ste_opt_lineno) is not initialized.

The following patch fixes the UMR, but doesn't fix
the problem (ie, the line # is still wrong):

Index: Python/symtable.c
===================================================================
RCS file:
/cvsroot/python/python/dist/src/Python/symtable.c,v
retrieving revision 2.7
diff -u -r2.7 symtable.c
--- Python/symtable.c   2001/11/28 21:36:28     2.7
+++ Python/symtable.c   2001/12/04 01:26:12
@@ -46,6 +46,7 @@
 
        ste->ste_optimized = 0;
        ste->ste_lineno = lineno;
+       ste->ste_opt_lineno = lineno;
        switch (type) {
        case funcdef:
        case lambdef:


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-03 17:42

Message:
Logged In: YES 
user_id=6380

This seems simple enough to deserve being fixed before 2.2
goes out.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=488687&group_id=5470