NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 44 forks source link

Chromium Segmentation fault in libnvidia-egl-wayland.so.1 with use_system_libwayland #35

Closed jdapena closed 2 months ago

jdapena commented 3 years ago

When using recent Chromium with NVIDIA and wayland, with the GN build option use_system_libwayland (that is intended to use the system available libwayland library instead of build the local copy available in third_party/wayland in chromium tree), Chromium crashes because of the check in wlEglCheckInterfaceType reported in #28.

But the fix for #28 is not enough. And I am afraid that check is wrong for cases like Chromium's, where it provides a wrapper of wayland symbols with hidden visibility, to be able to dynamically load system wayland library when available. It fails because dladdr in that case will return null dli_saddr and dli_sname. Because of that, I think the check should be just removed, as dladdr is not going to be reliable for that purpose.

Could we just get rid of that check? That's going to make upstream Chromium official future wayland support fail when used with NVIDIA drivers.

erik-kz commented 3 years ago

I have a candidate fix for https://github.com/NVIDIA/egl-wayland/issues/34 which modifies wlEglCheckInterfaceType to do a string comparison on the interface name instead of using dladdr. It sounds like that might help with this issue as well?

jdapena commented 3 years ago

I have a candidate fix for #34 which modifies wlEglCheckInterfaceType to do a string comparison on the interface name instead of using dladdr. It sounds like that might help with this issue as well?

Yes, I think this approach without dladdr should fix the issue.