This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients benjamin.peterson, pitrou, ron_adam, skrah
Date 2010-07-21.13:26:33
SpamBayes Score 0.027477695
Marked as misclassified No
Message-id <1279718840.83.0.757792181892.issue9319@psf.upfronthosting.co.za>
In-reply-to
Content
To be a little clearer: Since tok->filename is used as a flag in other
places, I'm not sure where to set it without breaking other things.
This is the location of the segfault and the following would "fix" it
(using a placeholder for the name):


Index: Parser/tokenizer.c
===================================================================
--- Parser/tokenizer.c  (revision 83019)
+++ Parser/tokenizer.c  (working copy)
@@ -582,6 +582,8 @@
     if (badchar) {
         /* Need to add 1 to the line number, since this line
            has not been counted, yet.  */
+        if (tok->filename == NULL)
+            tok->filename = "<file>";
         PyErr_Format(PyExc_SyntaxError,
             "Non-UTF-8 code starting with '\\x%.2x' "
             "in file %.200s on line %i, "
History
Date User Action Args
2010-07-21 13:27:20skrahsetrecipients: + skrah, pitrou, ron_adam, benjamin.peterson
2010-07-21 13:27:20skrahsetmessageid: <1279718840.83.0.757792181892.issue9319@psf.upfronthosting.co.za>
2010-07-21 13:26:34skrahlinkissue9319 messages
2010-07-21 13:26:33skrahcreate