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 brett.cannon
Recipients ajaksu2, brett.cannon, dalcinl
Date 2008-08-22.18:08:44
SpamBayes Score 5.792044e-10
Marked as misclassified No
Message-id <bbaeab100808221108h259ffbfcle8d16b35b53992ae@mail.gmail.com>
In-reply-to <1219417392.2.0.366920074146.issue3639@psf.upfronthosting.co.za>
Content
On Fri, Aug 22, 2008 at 8:03 AM, Daniel Diniz <report@bugs.python.org> wrote:
>
> Daniel Diniz <ajaksu@gmail.com> added the comment:
>
> Brett,
> I don't think I know C (and CPython) enough to fix this. I was able to
> get rid of this specific segfault with this:
>
> -            const char *text_char = _PyUnicode_AsString(text);
> +            const char *text_char =
> _PyUnicode_AsString(PyObject_Str(text));
>
> But I have no idea whether I should also incref/decref the PyObject_Str.
>

That's along the lines of what needs to be done (and what I was
planning on doing), although you need to do more error checking on the
return values. Plus the patch I am cooking up adds more checks in the
code for the return value of _PyUnicode_AsString().
History
Date User Action Args
2008-08-22 18:08:46brett.cannonsetrecipients: + brett.cannon, dalcinl, ajaksu2
2008-08-22 18:08:45brett.cannonlinkissue3639 messages
2008-08-22 18:08:44brett.cannoncreate