[Mesa-dev] [Bug 108933] Unreal Tournament (UT99) segfault on opengl init

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Dec 8 22:41:05 UTC 2018


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

--- Comment #10 from iive at yahoo.com ---
(In reply to Gustaw Smolarczyk from comment #9)
> The Core.so binary seems to export the __dynamic_cast symbol. It suggests
> that it has been statically linked with some old libstdc++ library that is
> incompatible with the most recent one.

You solved the mystery!

It makes sense since this is the last called function in the disassembly.

I can confirm that the issue does go away after changing the string
"__dynamic_cast" to "__dynamicZcast" in Core.so .

Can you recommend a more clean way to remove that?


> It might be impossible to run it correctly with any library written in C++.
> Mesa and LLVM usually avoid using RTTI, so the <iostream> might be the only
> thing that struggles. However, that is still a work-around. Some other
> driver might still not work correctly.

How about versioning __dynamic_cast?
If it behaves differently in different version...

Another solution might be linking Mesa plugins statically to the g++ listdc++.
I'm not sure if this is supported atm. It would have been very useful when
Steam used older version.


> I am not sure if removing the iostream sub-library usage from mesa is
> acceptable in general.

Mesa3D is mostly written in C. There are few parts in C++ and it seems that the
files I've patched are the only ones using "iostream". Since iostream is used
only for debugging, it is feasible to disable it on release builds.

But as I've said before, I don't know what LLVM compiled with latest libstdc++
would do.

-- 
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/20181208/606ea60a/attachment-0001.html>


More information about the mesa-dev mailing list