[Mesa-dev] [Bug 95128] [Gallium] uninitialized once_flag causes unregistered targets

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 25 10:00:31 UTC 2016


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

            Bug ID: 95128
           Summary: [Gallium] uninitialized once_flag causes unregistered
                    targets
           Product: Mesa
           Version: 11.2
          Hardware: Other
                OS: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: frederic.devernay at m4x.org
        QA Contact: mesa-dev at lists.freedesktop.org

>From this commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp?id=76cfd6f1da3748effb480e4f1151910af59fb88a

there is the line
static once_flag init_native_targets_once_flag;

where the once_flag is not initialized. This causes pthread_once() to never
call the function on some OSs (I got the bug with OSX 10.6, but not with OSX
10.11).

once_flags should *always* be initialized, as in:
static once_flag init_native_targets_once_flag = ONCE_FLAG_INIT;


The consequence is that I get errors like
"Unable to find target for this triple (no targets are registered)"
when using llvmpipe

I checked other places in Mesa that use once_flag, they are all initialized
correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160425/9bf42f19/attachment.html>


More information about the mesa-dev mailing list