https://bugs.freedesktop.org/show_bug.cgi?id=108669
Bug ID: 108669
Summary: driOpenDriver uses RTLD_GLOBAL and breaks clang's
libc++
Product: Mesa
Version: 18.0
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Mesa core
Assignee: mesa-dev@lists.freedesktop.org
Reporter: s...@list.ru
QA Contact: mesa-dev@lists.freedesktop.org
driOpenDriver() does this:
handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL)
When "realDriveName" == "radeonsi", we get libstdc++
loaded, because:
$ ldd /usr/lib64/dri/radeonsi_dri.so | grep libstdc++
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2b2ee30000)
So this dri driver is linked with libstdc++.
RTLD_GLOBAL makes a problem when the main program
or some other lib is built with clang's libc++.
There happens to be a mix of symbols with same name,
and an imminent, hard to debug crash.
Please use RTLD_LOCAL to avoid the problem.
I've found this patch:
https://lists.freedesktop.org/archives/mesa-commit/2014-June/050035.html
which reverts to RTLD_GLOBAL in 3 places.
The problem is described here:
https://lists.freedesktop.org/archives/mesa-dev/2014-May/060441.html
Based on that description, I think it was enough
to use RTLD_GLOBAL only for "libGL.so.1", leaving
other places with RTLD_LOCAL.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev