summaryrefslogtreecommitdiff
path: root/user/gwenview/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-08-09 07:21:00 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-08-09 07:21:00 +0000
commitfbef86fd7c6f53ccc77e59d2d076aa3015e83472 (patch)
tree89518ccbabb854f45221f7cb063a5e05ba1533ed /user/gwenview/APKBUILD
parentdfb5918749f143a5d318e5018a1bac254c07abd8 (diff)
downloadpackages-fbef86fd7c6f53ccc77e59d2d076aa3015e83472.tar.gz
packages-fbef86fd7c6f53ccc77e59d2d076aa3015e83472.tar.bz2
packages-fbef86fd7c6f53ccc77e59d2d076aa3015e83472.tar.xz
packages-fbef86fd7c6f53ccc77e59d2d076aa3015e83472.zip
user/gwenview: fix stack size overflow
When opening a .CR2 Canon RAW image, attempting to load the embedded preview for the thumbnail bar would result in a segmentation fault on at least x86_64, with the backtrace: Thread 4 "Thread (pooled)" received signal SIGSEGV, Segmentation fault. [Switching to LWP 10859] KDcrawIface::KDcraw::loadEmbeddedPreview (imgData=..., buffer=...) at /usr/src/packages/user/libkdcraw/src/libkdcraw-19.04.3/src/kdcraw.cpp:134 134 /usr/src/packages/user/libkdcraw/src/libkdcraw-19.04.3/src/kdcraw.cpp: No such file or directory. (gdb) bt #0 KDcrawIface::KDcraw::loadEmbeddedPreview (imgData=..., buffer=...) at /usr/src/packages/user/libkdcraw/src/libkdcraw-19.04.3/src/kdcraw.cpp:134 #1 0x00007ffff75c86af in Gwenview::LoadingDocumentImplPrivate::loadMetaInfo (this=0x555555f74a60) at /usr/src/packages/user/gwenview/src/gwenview-19.04.3/lib/document/loadingdocumentimpl.cpp:208 #2 0x00007ffff75c6fca in non-virtual thunk to QtConcurrent::RunFunctionTask<bool>::run() () at /usr/include/c++/8.3.0/bits/exception.h:63 #3 0x00007ffff348905c in QThreadPoolThread::run (this=0x555555c6cd40) at thread/qthreadpool.cpp:99 #4 0x00007ffff348e18f in QThreadPrivate::start (arg=0x555555c6cd40) at thread/qthread_unix.cpp:368 #5 0x00007ffff7db7779 in start (p=<optimized out>) at src/thread/pthread_create.c:195 #6 0x00007ffff7dc5957 in __clone () at src/thread/x86_64/clone.s:22 (gdb) x/i $pc => 0x7ffff11e50f9 <KDcrawIface::KDcraw::loadEmbeddedPreview(QByteArray&, QBuffer const&)+41>: callq 0x7ffff11e3030 <_ZN11KDcrawIface6KDcraw8rawFilesEv@plt> This is because the thumbnail was being loaded onto the thread's stack. Bumping the per-thread stack size to 1 MiB fixes this for all .CR2 files I have access to.
Diffstat (limited to 'user/gwenview/APKBUILD')
-rw-r--r--user/gwenview/APKBUILD7
1 files changed, 2 insertions, 5 deletions
diff --git a/user/gwenview/APKBUILD b/user/gwenview/APKBUILD
index 78cfc1858..92ecae330 100644
--- a/user/gwenview/APKBUILD
+++ b/user/gwenview/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gwenview
pkgver=19.04.3
-pkgrel=1
+pkgrel=2
pkgdesc="Fast and easy image viewer by KDE"
url="https://www.kde.org/applications/graphics/gwenview/"
arch="all"
@@ -18,11 +18,10 @@ subpackages="$pkgname-doc $pkgname-lang"
source="https://download.kde.org/stable/applications/$pkgver/src/gwenview-$pkgver.tar.xz"
build() {
- cd "$builddir"
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
- cmake \
+ LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576" cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
@@ -34,12 +33,10 @@ build() {
}
check() {
- cd "$builddir"
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
}