[Python-Dev] _PyUnicode_New crash

Trigve trigves at yahoo.com
Mon Sep 6 14:21:17 CEST 2010

I've found something strange while using unicode objects in embedded python.
Here is a situation. I'm creating a couple of unicode objects and then some
exception is thrown. While handling exception I create 2 unicode object. The 1.
one is created sucessfully but the second one not. The problem is in
on line (1):

if (free_list) {
    unicode = free_list; /*<- (1)*/
    free_list = *(PyUnicodeObject **)unicode;

In statement "unicode = free_list;" "unicode" pointer is bad pointer, in fact
it's address is 5 bytes "lower" (i.e. should be 0x030bc3ff but is 0x030bc3fa).
It looks like this only happens when exception is thrown. Anyone know where
could be the problem? I'm using python 3.2.1 on Vista with MSVS 2010


More information about the Python-Dev mailing list