[Bug 769183] New: Use -fno-strict-aliasing for everything

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 26 10:43:51 UTC 2016


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

            Bug ID: 769183
           Summary: Use -fno-strict-aliasing for everything
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: common
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: slomo at coaxion.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
                CC: martin at surround.io, slomo at coaxion.net
     GNOME version: ---

+++ This bug was initially created as a clone of Bug #769167 +++

gcc strict aliasing can break code that performs type-punning, unless
said type punning uses unions. See:

http://www.cocoawithlove.com/2008/04/using-pointers-to-recast-in-c-is-bad.html

for more details.


This basically applies to all code that does things like if I understand
correctly.

>  SomeObject *obj = ...;
>  ParentObject *parent = PARENT_OBJECT(obj);
>
>  obj->foo = 123;
>  parent->foo = 456;
>  some_method(obj) // might see parent->foo == 456 or not


We don't assign struct fields directly much though, need some analysis of the
impact of all this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list