reassign 642743 src:pyfribidi 0.10.0-3
thanks

* أحمد المحمودي <aelmahmo...@sabily.org>, 2011-10-26, 13:09:
I've received help from Arnaud Fontaine on this issue. After running the test through gdb on both Ubuntu & Debian, the following was found:

The segfault occurs on Debian because on: 'PyUnicode_Check (logical)' (line 60 in pyfribidi.c), 'logical' is NULL. 'logical' should be set by PyArg_ParseTupleAndKeywords() call.

On Debian, the PyArg_ParseTupleAndKeywords() call sets 'logical' in this test to NULL, while on Ubuntu, it sets 'logical' properly.

Hence, the problem seems to be in the Debian's python2.7 package.

Well, that's not an evidence that python2.7 is at fault. In fact, it's actually pyfribidi which is buggy. The code looks like this:

        PyObject *logical = NULL;       /* input unicode or string object */
        FriBidiParType base = FRIBIDI_TYPE_RTL; /* optional direction */
        const char *encoding = "utf-8"; /* optional input string encoding */
        int clean = 0; /* optional flag to clean the string */
        
        static char *kwargs[] =
                { "logical", "base_direction", "encoding", "clean", NULL };
        
        if (!PyArg_ParseTupleAndKeywords (args, kw, "O|lsI", kwargs,
                                          &logical, &base, &encoding, &clean))
                return NULL;

The type of "base" should be "long int" (64-bit on amd64) but it is "FriBidiParType" (32-bit on amd64). (Also, "clean" should be unsigned, but this is minor nitpick.)

After correcting the type of "base", the package builds successfully.

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to