Subject: [alpine-devel] [PATCH] Fix quasselcore crash during client connect

From: "Yves Schumann" <[email-masked]>
Date: Sun, 26 Jan 2014 20:33:54 +0100

Hi

The attached patch updates quassel to current version and add paxctl
usage during package build, see corresponding Gentoo issue [1]. Now
quasselcore did not crash if a quasselclient try to connect.

Some details if one is interested:
(gdb) frame 0
#0  QTJSC::ExecutablePool::systemAlloc (n=n@entry=16384) at
../3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp:47
47              CRASH();
(gdb) list
42
43      ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t n)
44      {
45          void* allocation = mmap(NULL, n, INITIAL_PROTECTION_FLAGS,
MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
46          if (allocation == MAP_FAILED)
47              CRASH();
48          ExecutablePool::Allocation alloc = {
reinterpret_cast<char*>(allocation), n };
49          return alloc;
50      }
51
(gdb) print n
$1 = 16384

The crash happens on /usr/lib/libQtScript.so.4.8.5

Kind regards,
Yves

[1] https://bugs.gentoo.org/show_bug.cgi?id=346255
--- new/quassel/APKBUILD
+++ original/quassel/APKBUILD
@@ -1,15 +1,15 @@
 # Maintainer: Yves Schumann <[email-masked]>

 pkgname=quassel
-pkgver=0.9.0
-pkgrel=1
+pkgver=0.9.2
+pkgrel=0
 url="http://www.quassel-irc.org/"
 pkgdesc="Distributed IRC client - metapackage"
 arch="all"
 license="GPL"
 install="quassel-core.pre-install"
 depends="quassel-common"
-makedepends="qt-dev cmake dbus-dev openssl-dev"
+makedepends="qt-dev cmake dbus-dev openssl-dev pax-utils"
 subpackages="$pkgname-common $pkgname-core $pkgname-client"
 source="http://www.quassel-irc.org/pub/quassel-$pkgver.tar.bz2
        quasselcore.confd
@@ -53,6 +53,7 @@
        pkgdesc="Core component of distributed IRC client"
        depends="$pkgname-common"
        mkdir -p "$subpkgdir"/usr/bin
+       paxctl -cm "$pkgdir"/usr/bin/quasselcore || return 1
        mv "$pkgdir"/usr/bin/quasselcore "$subpkgdir"/usr/bin/ || return 1
        install -Dm0644 "$srcdir"/quasselcore.confd \
                "$subpkgdir"/etc/conf.d/quasselcore || return 1
@@ -70,12 +71,12 @@
                "$pkgdir"/usr/share/applications \
                "$subpkgdir"/usr/share/
 }
-md5sums="29b843f18d703abfadb8fc729ca1df11  quassel-0.9.0.tar.bz2
+md5sums="4ed88d288f60290f4459d3e68d61b037  quassel-0.9.2.tar.bz2
 b196216514a44fd596a664a53e05d93e  quasselcore.confd
 92fb2f2f7a8658e52640d7ae6c709698  quasselcore.initd"
-sha256sums="2e3fe06ae3731c829aa3c2f6bb5320619bad264c831f322985c3aa3fe58b6027  quassel-0.9.0.tar.bz2
+sha256sums="f04d01602509c1d950602502e5f51aba47d99c73a9c70e77c563bb7749fc53c0  quassel-0.9.2.tar.bz2
 16cfaf919268ee3c3281fc4ad0dfc128b1c98f5edfc5cc522addd512f36d293c  quasselcore.confd
 af041a6c800ffb443d008b861c639bf32580b3655f7db3bc00db833374af6b2e  quasselcore.initd"
-sha512sums="5f0b54c7c0e839d30ec5cc1c76f115f60aef35c53b2ed1cc69cb856413e0b381bfa3b56d6a9b60d8a118d216930adb52856d39b1bbd4c96e8c0f3809756f6f21  quassel-0.9.0.tar.bz2
+sha512sums="81e343b9b7df7473c9d899df9ad8c4baa779545ac4fe15c3b7d47f3e9473d24aa78c8cfc1833b79ec5b4b3173e8d83e22394a50b7184f348b3f1155bb3724f3d  quassel-0.9.2.tar.bz2
 e03df342f47945f948106883a7757262ab7a8a7d21f0b4dd01cfcc95e836c2e00f2e0177a353b4f7a4b6f80ffa970be06d49aa9a42cad1f3834382267e5a0d7f  quasselcore.confd
 0405af90fe65589e163d6b2470ea4d4d3b8dad49ee3b89caba9bcffd7186bd92f204da4f8404e5ed489a949fc89b898f0b94c94c8382f90f89ccda5e2b8e2382  quasselcore.initd"

---

From: Natanael Copa <[email-masked]>
Date: Mon, 27 Jan 2014 14:06:45 +0100

On Sun, 26 Jan 2014 20:33:54 +0100

> quasselcore did not crash if a quasselclient try to connect.

nice!

applied. thanks!

-nc