hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.
GNU Lesser General Public License v2.1
65 stars 103 forks source link

Segfaults validating falkon appdata #455

Closed tsdgeos closed 2 years ago

tsdgeos commented 2 years ago

$ valgrind /usr/bin/appstream-util validate linux/appdata/org.kde.falkon.appdata.xml ==130291== Memcheck, a memory error detector ==130291== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==130291== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==130291== Command: /usr/bin/appstream-util validate linux/appdata/org.kde.falkon.appdata.xml ==130291== linux/appdata/org.kde.falkon.appdata.xml: (appstream-util:130291): GLib-GIO-CRITICAL **: 23:29:09.799: g_proxy_resolver_lookup: assertion 'G_IS_PROXY_RESOLVER (resolver)' failed ==130291== Invalid read of size 8 ==130291== at 0x48CB090: UnknownInlinedFun (as-app-validate.c:476) ==130291== by 0x48CB090: UnknownInlinedFun (as-app-validate.c:631) ==130291== by 0x48CB090: UnknownInlinedFun (as-app-validate.c:663) ==130291== by 0x48CB090: UnknownInlinedFun (as-app-validate.c:821) ==130291== by 0x48CB090: as_app_validate (as-app-validate.c:1627) ==130291== by 0x11503B: UnknownInlinedFun (as-util.c:2801) ==130291== by 0x11503B: as_util_validate_files (as-util.c:2840) ==130291== by 0x10F21F: UnknownInlinedFun (as-util.c:170) ==130291== by 0x10F21F: main (as-util.c:4755) ==130291== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==130291== ==130291== ==130291== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==130291== Access not within mapped region at address 0x8 ==130291== at 0x48CB090: UnknownInlinedFun (as-app-validate.c:476) ==130291== by 0x48CB090: UnknownInlinedFun (as-app-validate.c:631) ==130291== by 0x48CB090: UnknownInlinedFun (as-app-validate.c:663) ==130291== by 0x48CB090: UnknownInlinedFun (as-app-validate.c:821) ==130291== by 0x48CB090: as_app_validate (as-app-validate.c:1627) ==130291== by 0x11503B: UnknownInlinedFun (as-util.c:2801) ==130291== by 0x11503B: as_util_validate_files (as-util.c:2840) ==130291== by 0x10F21F: UnknownInlinedFun (as-util.c:170) ==130291== by 0x10F21F: main (as-util.c:4755) ==130291== If you believe this happened as a result of a stack ==130291== overflow in your program's main thread (unlikely but ==130291== possible), you can try to increase the size of the ==130291== main thread stack using the --main-stacksize= flag. ==130291== The main thread stack size used in this run was 8388608. ==130291== ==130291== HEAP SUMMARY: ==130291== in use at exit: 574,113 bytes in 8,353 blocks ==130291== total heap usage: 16,676 allocs, 8,323 frees, 1,725,359 bytes allocated ==130291== ==130291== LEAK SUMMARY: ==130291== definitely lost: 3,192 bytes in 45 blocks ==130291== indirectly lost: 7,968 bytes in 32 blocks ==130291== possibly lost: 73,324 bytes in 1,357 blocks ==130291== still reachable: 470,893 bytes in 6,730 blocks ==130291== suppressed: 0 bytes in 0 blocks ==130291== Rerun with --leak-check=full to see details of leaked memory ==130291== ==130291== For lists of detected and suppressed errors, rerun with: -s ==130291== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Violació de segment (s'ha bolcat la memòria)

The file https://invent.kde.org/network/falkon/-/blob/master/linux/appdata/org.kde.falkon.appdata.xml

hughsie commented 2 years ago

Is this the same as https://github.com/hughsie/appstream-glib/pull/450 ?

tsdgeos commented 2 years ago

Could be, that commit not in 0.8.0 right?

sssemil commented 2 years ago

Same in touche and spot.

sssemil commented 2 years ago

@hughsie do you think it's time for a release? Looks like quite a few applications are now non-installable because this is not in a release.

ximion commented 2 years ago

Could be, that commit not in 0.8.0 right?

It's not - it is cherry-picked to at least Fedora and Debian though. Hughsie is currently away, so can't make a release quickly - I think we will be able to address this issue much faster simply by backporting that patch to distros :-) If this breaks your build, it's also actually a great idea to migrate to appstreamcli and get support for newer AppStream metadata features ;-)

hughsie commented 2 years ago

Releases are cheap :) I've tagged 0.8.2 for you; just doing Fedora builds now.

ximion commented 2 years ago

Nice, thank you! :-)

sssemil commented 2 years ago

Thanks!