From d273e676cdbb7ffe1325f2773d9e4bc3d0081294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Sun, 9 May 2021 19:21:58 -0300 Subject: [PATCH] mbuffer: update to 20210328. --- .../0001-mbuffer-don-t-cancel-ReaderThr.patch | 33 ------------------- srcpkgs/mbuffer/template | 6 ++-- 2 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 srcpkgs/mbuffer/patches/0001-mbuffer-don-t-cancel-ReaderThr.patch diff --git a/srcpkgs/mbuffer/patches/0001-mbuffer-don-t-cancel-ReaderThr.patch b/srcpkgs/mbuffer/patches/0001-mbuffer-don-t-cancel-ReaderThr.patch deleted file mode 100644 index 1dd1605472..0000000000 --- a/srcpkgs/mbuffer/patches/0001-mbuffer-don-t-cancel-ReaderThr.patch +++ /dev/null @@ -1,33 +0,0 @@ -Subject: [PATCH] mbuffer: don't cancel ReaderThr. - -joinSenders is called after ReaderThr has been joined, which makes the -pthread_cancel call in cancelAll undefined behavior and a case of -use-after-free. Since the thread will already have been joined in main -by the time joinSenders is called, there is no need to cancel it, so -that call can simply be removed. - -Furthermore, we don't have to account for situations where pthread_join -can fail, because this program doesn't generate them. If there were -other threads which tried to join readerThr at the same time, a -successful pthread_join call should also set Status=0, so pthread_cancel -isn't called. However, that isn't necessary. ---- - mbuffer.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/mbuffer.c b/mbuffer.c -index 79c997f..6e65277 100644 ---- a/mbuffer.c -+++ b/mbuffer.c -@@ -166,8 +166,6 @@ static void cancelAll(void) - d->result = "canceled"; - d = d->next; - } while (d); -- if (Status) -- (void) pthread_cancel(ReaderThr); - } - - --- -2.30.2 - diff --git a/srcpkgs/mbuffer/template b/srcpkgs/mbuffer/template index fa30e2134c..97e0daac30 100644 --- a/srcpkgs/mbuffer/template +++ b/srcpkgs/mbuffer/template @@ -1,7 +1,7 @@ # Template file for 'mbuffer' pkgname=mbuffer -version=20210209 -revision=2 +version=20210328 +revision=1 build_style=gnu-configure makedepends="openssl-devel" checkdepends="tar" @@ -10,6 +10,6 @@ maintainer="Diogo Leal " license="GPL-3.0-or-later" homepage="https://www.maier-komor.de/mbuffer.html" distfiles="https://www.maier-komor.de/software/mbuffer/mbuffer-${version}.tgz" -checksum=e81f2788e2621f20f848181ef2cb19ac6d12328691437f301574b253fd899a0c +checksum=51b5b8d8488991a55fe1dfce90130f9e47bc1ce286ba03b4f628c04b784fdc5d patch_args=-Np1 conf_files="/etc/mbuffer.rc"