Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915582 - net-im/telegram-desktop-4.10.3[qt6] segfaults with dev-qt/qtsvg-6.6.0 (can't handle invalid SVG)
Summary: net-im/telegram-desktop-4.10.3[qt6] segfaults with dev-qt/qtsvg-6.6.0 (can't ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 838973
  Show dependency tree
 
Reported: 2023-10-11 08:05 UTC by Joe Kappus
Modified: 2023-10-19 11:56 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Kappus 2023-10-11 08:05:53 UTC
Opening bug to track this. It looks like upstream knows about the crash when built with 6.6 and are choosing to downgrade to 6.5 until a real fix is pushed: https://github.com/telegramdesktop/tdesktop/commit/a5ec616382dd0034d62bccd241ad536242bd9b0b

Backtrace of the crash:

#0  0x00007ffff611e960 in  () at /usr/lib64/libQt6Svg.so.6
#1  0x00007ffff61279f8 in QSvgHandler::parse() () at /usr/lib64/libQt6Svg.so.6
#2  0x00007ffff613a38b in QSvgTinyDocument::load(QByteArray const&) () at /usr/lib64/libQt6Svg.so.6
#3  0x00007ffff613194b in QSvgRenderer::load(QByteArray const&) () at /usr/lib64/libQt6Svg.so.6
#4  0x00007fffebb61b36 in  () at /usr/lib64/qt6/plugins/imageformats/libqsvg.so
#5  0x00007fffebb61efb in  () at /usr/lib64/qt6/plugins/imageformats/libqsvg.so
#6  0x00007ffff2b5ca7b in  () at /usr/lib64/libQt6Gui.so.6
#7  0x00005555584594a9 in Images::ReadOther(Images::ReadArgs const&) (args=...)
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_ui/ui/image/image_prepare.cpp:434
#8  0x0000555558459775 in Images::Read(Images::ReadArgs&&) (args=...)
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_ui/ui/image/image_prepare.cpp:452
#9  0x0000555557ef72f9 in operator() (__closure=0x7fffda227c90) at /usr/include/qt6/QtCore/qarraydata.h:52
#10 operator() (__closure=<optimized out>, passed=0x7fffda227c90)
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:51
#11 crl::details::EmptyWrapper::Invoke<crl::details::on_queue_invoke<EmptyWrapper, void (*)(void*, void (*)(void*), void*), FileLoader::loadLocal(const Storage::Cache::Key&)::<lambda(QByteArray&&)> mutable::<lambda()> >(void*, void (*)(void*, void (*)(void*), void*), FileLoader::loadLocal(const Storage::Cache::Key&)::<lambda(QByteArray&&)> mutable::<lambda()>&&)::<lambda(void*)>::<lambda(void*)> >
    (argument=0x7fffda227c90, callable=<optimized out>)
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:60
#12 operator() (passed=0x7fffda227c90, __closure=0x0)
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:48
#13 _FUN(void*) ()
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:47
#14 0x00007ffff6bc4630 in  () at /usr/lib64/libdispatch.so
#15 0x00007ffff18c8179 in  () at /lib64/libc.so.6
#16 0x00007ffff19391c8 in  () at /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff611e960 in  () at /usr/lib64/libQt6Svg.so.6
#1  0x00007ffff61279f8 in QSvgHandler::parse() () at /usr/lib64/libQt6Svg.so.6
#2  0x00007ffff613a38b in QSvgTinyDocument::load(QByteArray const&) () at /usr/lib64/libQt6Svg.so.6
#3  0x00007ffff613194b in QSvgRenderer::load(QByteArray const&) () at /usr/lib64/libQt6Svg.so.6
#4  0x00007fffebb61b36 in  () at /usr/lib64/qt6/plugins/imageformats/libqsvg.so
#5  0x00007fffebb61efb in  () at /usr/lib64/qt6/plugins/imageformats/libqsvg.so
#6  0x00007ffff2b5ca7b in  () at /usr/lib64/libQt6Gui.so.6
#7  0x00005555584594a9 in Images::ReadOther(Images::ReadArgs const&) (args=...) at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_ui/ui/image/image_prepare.cpp:434
#8  0x0000555558459775 in Images::Read(Images::ReadArgs&&) (args=...) at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_ui/ui/image/image_prepare.cpp:452
#9  0x0000555557ef72f9 in operator() (__closure=0x7fffda227c90) at /usr/include/qt6/QtCore/qarraydata.h:52
#10 operator() (__closure=<optimized out>, passed=0x7fffda227c90) at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:51
#11 crl::details::EmptyWrapper::Invoke<crl::details::on_queue_invoke<EmptyWrapper, void (*)(void*, void (*)(void*), void*), FileLoader::loadLocal(const Storage::Cache::Key&)::<lambda(QByteArray&&)> mutable::<lambda()> >(void*, void (*)(void*, void (*)(void*), void*), FileLoader::loadLocal(const Storage::Cache::Key&)::<lambda(QByteArray&&)> mutable::<lambda()>&&)::<lambda(void*)>::<lambda(void*)> > (argument=0x7fffda227c90, callable=<optimized out>)
    at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:60
#12 operator() (passed=0x7fffda227c90, __closure=0x0) at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:48
#13 _FUN(void*) () at /var/tmp/portage/net-im/telegram-desktop-4.10.3/work/tdesktop-4.10.3-full/Telegram/lib_crl/crl/dispatch/crl_dispatch_async.h:47
#14 0x00007ffff6bc4630 in  () at /usr/lib64/libdispatch.so
#15 0x00007ffff18c8179 in  () at /lib64/libc.so.6
#16 0x00007ffff19391c8 in  () at /lib64/libc.so.6
Comment 1 Esteve Varela Colominas 2023-10-11 11:06:38 UTC
This was already reported to me, thanks for making it a proper issue.
I will not do anything about this, though I will add the relevant blockers to *DEPEND. Glad to know upstream is taking care of it.
Comment 2 Andrey Volkov 2023-10-12 07:29:01 UTC
This bug is related to dev-qt/qtsvg-6.6.0

Fixed upstream
https://github.com/qt/qtsvg/commit/effc44495a33babd4cf7a2044123f420e6b3da1c.patch

net-im/telegram-desktop-4.10.3[qt6] with patched qtsvg-6.6.0 works fine for me
Comment 3 Andrey Volkov 2023-10-12 07:41:58 UTC
https://bugreports.qt.io/browse/QTBUG-117944
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-12 07:50:57 UTC
(In reply to Andrey Volkov from comment #3)
> https://bugreports.qt.io/browse/QTBUG-117944

=> https://codereview.qt-project.org/c/qt/qtsvg/+/510692 for 6.6
Comment 5 Larry the Git Cow gentoo-dev 2023-10-12 19:52:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37a5ee017ab4bc745fdff6626603ceb5ebbdd129

commit 37a5ee017ab4bc745fdff6626603ceb5ebbdd129
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-10-12 19:47:56 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-10-12 19:52:36 +0000

    dev-qt/qtsvg: backport qt6.6 fix for crash with invalid SVGs
    
    Bug: https://bugs.gentoo.org/915582
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-qt/qtsvg/files/qtsvg-6.6.0-invalid-svg-crash.patch | 18 ++++++++++++++++++
 .../{qtsvg-6.6.0.ebuild => qtsvg-6.6.0-r1.ebuild}      |  4 ++++
 2 files changed, 22 insertions(+)
Comment 6 Ionen Wolkens gentoo-dev 2023-10-12 19:55:12 UTC
(In reply to Esteve Varela Colominas from comment #1)
> This was already reported to me, thanks for making it a proper issue.
> I will not do anything about this, though I will add the relevant blockers
> to *DEPEND. Glad to know upstream is taking care of it.
By the way, the build failure I mentioned before with 6.6.0-rc seems gone, maybe this got fixed in final. Along with this qtsvg fix, I'd assume that won't be needed. 

Not that I've really tried given I don't use this, please close if all good.
Comment 7 Esteve Varela Colominas 2023-10-13 09:58:14 UTC
Thanks a lot for the backport! I'll close this issue. Please make a new issue if other problems regarding qt6.6 pop up.