[New-bugs-announce] [issue10186] Invalid SyntaxError pointer offset

Alex report at bugs.python.org
Sun Oct 24 01:42:05 CEST 2010


New submission from Alex <malicious.wizard at gmail.com>:

Builtin SyntaxError formatter does never point to char before last in wrong source line. traceback.format_exception() is not affected.

*** Example:
>>> raise SyntaxError('', ('', 0, 3, 'hello'))
...
    hello
      ^
SyntaxError: test
>>> raise SyntaxError('', ('', 0, 4, 'hello'))
...
    hello
       ^
SyntaxError: test
>>> raise SyntaxError('', ('', 0, 5, 'hello'))
...
    hello   # <-- note that it's not "o"
       ^
SyntaxError: test
>>> raise SyntaxError('', ('', 0, 6, 'hello'))
...
    hello
         ^
SyntaxError: test

----------
components: Interpreter Core
messages: 119479
nosy: mwizard
priority: normal
severity: normal
status: open
title: Invalid SyntaxError pointer offset
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10186>
_______________________________________


More information about the New-bugs-announce mailing list