[PD-dev] libraries that crash in a double-precision runtime

Thomas Grill gr at grrrr.org
Fri Mar 6 16:33:23 CET 2020


Dear all,
i have published binaries on deken for many of my externals covering a lot of platforms and variants (i386/x86_64/arm6/arm7/arm64 on darwin/windows/linux, single and double precision floats).
Specifically, binaries for Windows and Pd double precision have been newly added. I am not able to test the externals on all platforms.
If you like, please give them a try and let me know should there be crashes or other problems.
best, Thomas

> Am 03.03.2020 um 14:55 schrieb Thomas Grill <gr at grrrr.org>:
> 
> Hi all,
> thanks to IOhannes for debugging.
> I have pushed fixes to https://github.com/grrrr/flext which should make flext (and flext-based objects) fully compatible with 64-bit DSP, that is, flext-based project should compile and run (or at least, not crash).
> 
> My question is now how to separate 32-bit DSP from 64-bit DSP binaries. There doesn't seem a separate file extension, right?
> How are two variants handled in deken?
> 
> best, Thomas
> 
>> Am 02.03.2020 um 11:51 schrieb IOhannes m zmölnig <zmoelnig at iem.at>:
>> 
>> Signierter PGP-Teil
>> On 3/2/20 10:43 AM, IOhannes m zmölnig wrote:
>>> On 3/1/20 10:51 PM, IOhannes m zmölnig wrote:
>>>> On 2/26/20 2:28 PM, IOhannes m zmoelnig wrote:
>>>>> class_new() *might* return a NULL-pointer (and it will, if the precision
>>>>> doesn't match), so you have to check for that before you access any
>>>>> class members.
>>>>> 
>>>> 
>>> 
>>> TL;DR there was a bug in Pd that created a few false positives in my
>>> original list.
>> 
>> since all flext externals are crashing, i thought i had a look at those
>> specifically.
>> it turns out, that flext has it's own use for NULL-classes, as it
>> internally uses them to create a persistent (and invisible) "flext
>> buffer helper" object.
>> 
>> with mismatched float-sizes, this results in calling `pd_new(NULL)` -
>> something that never happens in the ordinary flow, where pd_new() only
>> gets called in the newmethod of an objectclass. Pd itself doesn't call
>> the newmethod of objectclasses with mismatched float-size, so this is
>> usually not a problem.
>> 
>> however, it's easy enough to fix. pd_new() already does a NULL-ptr
>> check, but only prints an error and happily proceeds to access it's
>> members, leading to the inevitable crash.
>> doing an early exit in this case, reduces the list of crashing externals
>> to the following eleven (11) packages:
>> - creb
>> - cyclone
>> - hcs
>> - moonlib
>> - nilwind
>> - ossia
>> - pddp
>> - pdlua
>> - pof
>> - unauthorized
>> - Gem (crash fixed upstream, but no release yet)
>> - py (this is a false-positive, as it also crashes if the float-sizes do
>> match)
>> - context (the crash is triggered by the embedded cyclone)
>> 
>> even though, we can fix pd_new() to accept NULL-classes, flext should
>> probably handle this explicitly and not attempt to create the "flext
>> buffer helper" object if the class-pointer is invalid.
>> 
>> gfadsmr
>> IOhannes
>> 
>> 
>> 
> 
> --
> Thomas Grill
> http://grrrr.org

--
Thomas Grill
http://grrrr.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 874 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20200306/4875c3e9/attachment.sig>


More information about the Pd-dev mailing list