[Bug 728738] Depending on undefined C behaviour

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Sep 17 07:15:21 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=728738
  GStreamer | orc | git

Wim Taymans <wim.taymans> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wim.taymans at gmail.com

--- Comment #3 from Wim Taymans <wim.taymans at gmail.com> 2014-09-17 14:15:15 UTC ---
commit 45957a71c26285ee097029706100e8555ff6189f
Author: Wim Taymans <wtaymans at redhat.com>
Date:   Wed Sep 17 16:06:35 2014 +0200

    opcodes: avoid undefined operations on signed ints

    Cast to unsigned int when doing addition and subtraction that can
    overflow.
    Cast to unsigned int when doing the lower part of a multiplication.
    Cast to unsigned int when doing left shifts into the sign bit.
    Regenerate the emulation code. This should avoid multiple warnings
    reported with clang and -fsanitize=undefined.

    See https://bugzilla.gnome.org/show_bug.cgi?id=728738

commit 4a7f1c0c1d9418e7d220110c5a0ec732f755c284
Author: Wim Taymans <wtaymans at redhat.com>
Date:   Wed Sep 17 15:36:47 2014 +0200

    compiler: do << and | on unsigned ints only

commit 42a1f65a23f5f51ace2b125741890723bede9606
Author: Wim Taymans <wtaymans at redhat.com>
Date:   Wed Sep 17 15:19:46 2014 +0200

    utils: convert to uin32 before doing |

    In ORC_READ_UINT32_LE, convert each byte to uint32 before or-ing them
    together. This avoids | with signed ints.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gstreamer-bugs mailing list