[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] sipReleaseType may delete a derived type when it is not
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2017-06-10 14:20:54
Message-ID: 6EE105E6-F704-4F71-BF85-E560B9E2E3D9 () riverbankcomputing ! com
[Download RAW message or body]
On 7 Jun 2017, at 11:27 am, Denis Rivière <denis.riviere@cea.fr> wrote:
>
>
> Hi,
>
> We experience crashes using sip 4.18 and 4.19, where it works fine using 4.17.
> I have dug for a while in the code, and found out that in some cases, after object conversion \
> into a class using its %ConvertToTypeCode, the object gets deleted after a cast to the wrong \
> sip-derived class.
...
> Here the release code is called with sipIsDerived argument set to 1. However 1 is actually \
> directly the "state" value set in %ConvertToTypeCode, which does not mean SIP_DERIVED_CLASS \
> (which value is 2), but SIP_TEMPORARY.
> In the source code of siplib (siplib.c.in), the code of sip_api_release_type() calls the \
> release function of the type object with complete "state" value, not a boolean meaning if it \
> is derived.
> So I think there is a bug there.
> Am I right ?
I think so - good catch.
Should be fixed in tonight's snapshot.
Thanks,
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic