Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Fix qbittorrent crash on musl
Date: Wed, 07 Sep 2022 22:36:13 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39154@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages boost-fix
https://github.com/void-linux/void-packages/pull/39154

Fix qbittorrent crash on musl
- boost: fix segfault in asio+align module.
- libtorrent-rasterbar: rebuild to fix segfault.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39154.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boost-fix-39154.patch --]
[-- Type: text/x-diff, Size: 4138 bytes --]

From a8741c7190b8998c5081737f1bf6074c91fd5761 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 7 Sep 2022 17:32:19 -0300
Subject: [PATCH 1/2] boost: fix segfault in asio+align module.

---
 srcpkgs/boost/patches/align.patch | 49 +++++++++++++++++++++++++++++++
 srcpkgs/boost/template            |  2 +-
 2 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/boost/patches/align.patch

diff --git a/srcpkgs/boost/patches/align.patch b/srcpkgs/boost/patches/align.patch
new file mode 100644
index 000000000000..bc4ff316ded4
--- /dev/null
+++ b/srcpkgs/boost/patches/align.patch
@@ -0,0 +1,49 @@
+This code is wrong and uses feature test macros to determine whether something
+is available; FTMs shouldn't be in user code outside of top level #define's.
+
+This lead to an issue on musl where libtorrent-rasterbar was including this
+header (via boost asio) from two different places, and segfaulting due to
+mismatched implementations -- one's the posix one using posix_memalign, the
+other one's the generic one that stores a pointer to itself.
+
+posix_memalign is always available and should always be used, so we force that.
+
+diff --git a/boost/align/aligned_alloc.hpp b/boost/align/aligned_alloc.hpp
+index 1d81a13..a441645 100644
+--- a/boost/align/aligned_alloc.hpp
++++ b/boost/align/aligned_alloc.hpp
+@@ -14,34 +14,6 @@ Distributed under the Boost Software License, Version 1.0.
+ #include <unistd.h>
+ #endif
+ 
+-#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh)
+-#include <AvailabilityMacros.h>
+-#endif
+-
+-#if defined(BOOST_ALIGN_USE_ALIGN)
+-#include <boost/align/detail/aligned_alloc.hpp>
+-#elif defined(BOOST_ALIGN_USE_NEW)
+-#include <boost/align/detail/aligned_alloc_new.hpp>
+-#elif defined(_MSC_VER) && !defined(UNDER_CE)
+-#include <boost/align/detail/aligned_alloc_msvc.hpp>
+-#elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700)
+-#include <boost/align/detail/aligned_alloc_msvc.hpp>
+-#elif defined(__MINGW32__)
+-#include <boost/align/detail/aligned_alloc_mingw.hpp>
+-#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+-#include <boost/align/detail/aligned_alloc_posix.hpp>
+-#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+-#include <boost/align/detail/aligned_alloc_macos.hpp>
+-#elif defined(__ANDROID__)
+-#include <boost/align/detail/aligned_alloc_android.hpp>
+-#elif defined(__SunOS_5_11) || defined(__SunOS_5_12)
+ #include <boost/align/detail/aligned_alloc_posix.hpp>
+-#elif defined(sun) || defined(__sun)
+-#include <boost/align/detail/aligned_alloc_sunos.hpp>
+-#elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
+-#include <boost/align/detail/aligned_alloc_posix.hpp>
+-#else
+-#include <boost/align/detail/aligned_alloc.hpp>
+-#endif
+ 
+ #endif
diff --git a/srcpkgs/boost/template b/srcpkgs/boost/template
index 0d103e335b52..ef383d7f85ed 100644
--- a/srcpkgs/boost/template
+++ b/srcpkgs/boost/template
@@ -1,7 +1,7 @@
 # Template file for 'boost'
 pkgname=boost
 version=1.80.0
-revision=1
+revision=2
 wrksrc="${pkgname}_${version//\./_}"
 hostmakedepends="which bzip2-devel icu-devel python3-devel pkg-config"
 makedepends="zlib-devel bzip2-devel icu-devel python3-devel liblzma-devel

From 67d4f3ca885fb05c2a99c88aaadb9778947aa826 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 7 Sep 2022 17:34:19 -0300
Subject: [PATCH 2/2] libtorrent-rasterbar: rebuild to fix segfault.

Since asio is a header-only library, we need to rebuild its dependents.
---
 srcpkgs/libtorrent-rasterbar/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libtorrent-rasterbar/template b/srcpkgs/libtorrent-rasterbar/template
index 52377b39eca4..135d89b9c85a 100644
--- a/srcpkgs/libtorrent-rasterbar/template
+++ b/srcpkgs/libtorrent-rasterbar/template
@@ -2,7 +2,7 @@
 # Breaks ABI/API without changing soname, revbump all dependants
 pkgname=libtorrent-rasterbar
 version=1.2.17
-revision=1
+revision=2
 build_style=cmake
 configure_args="DCMAKE_CXX_STANDARD=14 -Dbuild_examples=ON -Dbuild_tools=ON
  -Dpython-bindings=ON"

             reply	other threads:[~2022-09-07 20:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 20:36 ericonr [this message]
2022-09-07 20:37 ` ericonr
2022-09-08  1:34 ` [PR REVIEW] " sgn
2022-09-08  1:34 ` sgn
2022-09-08  2:45 ` ericonr
2022-09-08  2:46 ` ericonr
2022-09-08  2:49 ` [PR PATCH] [Updated] " ericonr
2022-09-08  5:48 ` [PR REVIEW] " sgn
2022-09-08  5:50 ` sgn
2022-09-09  1:55 ` [PR PATCH] [Updated] " sgn
2022-09-09  1:56 ` sgn
2022-09-09  1:58 ` [PR REVIEW] " sgn
2022-09-09  6:34 ` [PR PATCH] [Updated] " sgn
2022-09-09  6:34 ` sgn
2022-09-11 16:31 ` sgn
2022-09-11 16:37 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39154@inbox.vuxu.org \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).