[PD] bug: [tabwrite~] (worse: PD_BIGORSMALL) broken with 0.43 (linux)

IOhannes m zmoelnig zmoelnig at iem.at
Tue May 24 19:35:55 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ola,

i just noticed that [tabwrite~] is not doing as exptected in 0.43.
i attached a patch that triggers the problem for me.

chances are, that the bug is only exposed on linux, as it turned outm
that the PD_BIGORSMALL macro doesn't work anymore with the default
optimizations on gcc-4.5.3 (debian wheezy/sid)

the problem has been reported by claude before [1], but this time it hit
me in the real world.

the problem is, that with "aggressive" optimization (like "-O2", which
is the "default" when building pd), one cannot assume that one can
happily cast between pointers to ints and floats (the compiler assumes
that they ints and floats never live in the same memory, unless told so
explicitely, using a "union")

i have therefore created a patch (actually three patches) that fixes the
underlying problem by using unions rather than directly typecasting
between int*/float*.

hopefully this will get included in 0.43.1

ghmadrt
IOhannes






[1]
https://sourceforge.net/tracker/index.php?func=detail&aid=2989552&group_id=55736&atid=478072
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3b7HgACgkQkX2Xpv6ydvROuACgsyMwMbIYuoZhLh1es6+6cC8a
UrUAoIDWGSgXreeeyAHAOpXes8F3sQgZ
=L+ef
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tabwrite-fails.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110524/d2e50424/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110524/d2e50424/attachment.bin>


More information about the Pd-list mailing list