[Bug 91320] The cure for all kinds of weirdness caused by list defects in release builds

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 12 17:56:38 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91320

            Bug ID: 91320
           Summary: The cure for all kinds of weirdness caused by list
                    defects in release builds
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: idr at freedesktop.org
          Reporter: tschwinger at isonews2.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Created attachment 117080
  --> https://bugs.freedesktop.org/attachment.cgi?id=117080&action=edit
exec_list fix for optimizing compilers

Observed:

Segfaulting and optimization passes that fail to terminate. Problems were
observed with both GCC and Clang.

Expected:

None of it.

Analysis:

Optimizing compilers will ignore modification through the sentinel nodes cast
from the list structure.

Code like 

    while (! list.is_empty()) ... list.pop_head(); ...

breaks, because the compiler assumes that the list structure doesn't change.

Fix:

Good old Amiga-style lists can still work with modern, optimizing compilers as
long as they are told to check for side effects on the sentinels' respective
next / prev pointers. See contained patch - it's actually quite simple and
should leave most optimizations intact.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150713/26f2a133/attachment.html>


More information about the intel-3d-bugs mailing list