Bugs item #1788587, was opened at 2007-09-05 18:01 Message generated for change (Comment added) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1788587...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: externals Group: None
Status: Closed Resolution: Accepted
Priority: 5 Private: No Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Martin Peach (mrpeach) Summary: unpackOSC doesn't like typed floats
Initial Comment: unpackOSC does not decode an osc-message correctly that contains a floating-point number and typetags. (see attached patch to trigger the bug)
the problem only occurs if compiled with strict-aliasing enabled (default on gcc>3.0 with optimization levels 2, 3, s), because unpackOSC uses pointer-casts for re-interpreting the data.
for information on this see: http://mail.opensolaris.org/pipermail/tools-gcc/2005-August/000047.html
one way to prevent this problem is by adding the "-fno-strict-aliasing" to the CFLAGS.
unfortunately, osc comes without build-system so you cannot add this flag...
tested with: pd-0.40.1, pd-0.41test6 (linux x86)
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2007-09-06 10:18
Message: Logged In: YES user_id=564396 Originator: YES
fixed (btw, mrpeach, can you close an open issue yourself, or does this require administrator privileges?)
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach) Date: 2007-09-05 21:48
Message: Logged In: YES user_id=919007 Originator: NO
Should be fixed now...
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2007-09-05 18:04
Message: Logged In: YES user_id=564396 Originator: YES
one more remark: neither the version in pd-extended nor matt wright's original "dumpOSC" application usually exhibit this problems, as they use different compiler flags.
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2007-09-05 18:04
Message: Logged In: YES user_id=564396 Originator: YES
a more generic solution for this problem is to use unions (as described in the above-mentioned article) instead of pointer-casts.
the attached patch does this and it seems to fix the problem, it would be nice if this could make it into osc (for the one single person who does not use the pd-extended build-system) File Added: unpackOSC.c.diff
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1788587...