Skip to content
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

Leads to segfault for Qt6 applications #8

Closed
probonopd opened this issue Sep 11, 2023 · 4 comments
Closed

Leads to segfault for Qt6 applications #8

probonopd opened this issue Sep 11, 2023 · 4 comments

Comments

@probonopd
Copy link
Member

probonopd commented Sep 11, 2023

Preloading this leads to Qt5 being loaded in addition to Qt6, which leads to

% qtcreator
zsh: segmentation fault  qtcreator

We need to find a way to change QKeySequence::toString() without using LD_PRELOAD. Is the only way to recompile (parts of) Qt?

@jsm222
Copy link
Contributor

jsm222 commented Sep 12, 2023

Not tested at all but perhaps a full implementation like here helloSystem/hello#46 (comment) that not depend on existing binary lib symbol could sort out the Qt5/6 conflict..

@jsm222
Copy link
Contributor

jsm222 commented Sep 12, 2023

perhaps this change is the course https://codereview.qt-project.org/c/qt/qtbase/+/281289/42 I am looking into it..

@probonopd
Copy link
Member Author

probonopd commented Sep 13, 2023

GammaRay is inserting something into running applications; before it does that, it seems to check for the Qt version, among other things ("probe ABI"):
https://github.com/KDAB/GammaRay/wiki/Troubleshooting

Not sure, but maybe we can learn something from there. It also seems to use LD_PRELOAD:
https://github.com/KDAB/GammaRay/blob/master/launcher/core/injector/preloadinjector.cpp

@jsm222
Copy link
Contributor

jsm222 commented Sep 14, 2023

The thing is that qt5 and qt6 shares the symbol we want to override so either if the preloaded so is compiled for qt5 it works with qt5, and the same for qt6 but not at the same time . in other words because the symbol we are overriding is the same in both qt versions we cannot preload two versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants