-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glib_compat breaks Qt Widgets with glib backend #1943
Comments
We don’t expose any glibs symbols so please check your own build scripts. |
I experience this bug on upstream packages in Ubuntu 23.10 amd64 (Qt and libunicorn). I tried to create a minimal example of this bug. once i force compiler to include libunicorn by putting Backtrace of the crash This issue happens even if no libunicorn code is ever run, is linker-related only. I confirmed this issue is affecting unicorn git master and dev, Qt5 and Qt6 both crashes. Remove glib_compat solves this for opensource world, where bundling code is not a good way to go. |
I got the point. Please check if you are linking against unicorn statically. If so, could you try to |
I dont use static libraries. Checked the ldd output and indeed it is full dynamic binary. Ldd output: |
If you are using dynamic library, I think it's really not our fault. There are many users using dynamic library via our bindings, especially python and Could you try to reproduce this without Qt? Meaning, just using |
I managed to reproduce it closer to glib, I made GTK3 only minimal window example (without Qt) and it crashes the same way. I am trying to get even closer and have just glib2 and libunicorn, but first I must get understanding of what GTK3 do with glib to make it crash like this. |
I have got an idea how to test if symbols are leaking out. I compile this test with Ldd output on this simple binary is: I digged deeper and listed all exported symbols of "libunicorn.so" with |
Please send in a PR to make those glibc API private, that will solve the
problem.
|
I see. It's our fault. All glib functions lacks a |
I checked in a minimum patch to dev, could you have a try? |
I confirm that commit da84208 fixes the bug for me. Thank you for developing this great software :-) |
When unicorn is linked in program that uses Qt Widgets (that uses glib internally),
the glib_compat inside breaks resulting binary (Qt wrongly uses glib_compat and crashes).
I removed glib_compat from unicorn completely and pointed it to system glib,
everythinks works OK now (Qt works and unicorn works).
Is it possible to prevent such library incompatibilities?
Maybe rename glib_compat functions to not collide with glib, or remove glib_compat completely (as I did).
Why is it there at all?
The text was updated successfully, but these errors were encountered: