Backport another two fixes from current git master

This commit is contained in:
Lennart Poettering 2008-11-01 21:06:36 +00:00
parent 7cf350f66c
commit 1bcc449374
3 changed files with 79 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 68e9a48bb96f195ee13a093d7741a658d89591a7 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Sat, 1 Nov 2008 21:41:07 +0100
Subject: [PATCH] make shm marker architecture independant, patch from michich, closes #401
---
src/pulsecore/shm.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index b299757..c59d247 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -73,10 +73,10 @@
struct shm_marker PA_GCC_PACKED {
pa_atomic_t marker; /* 0xbeefcafe */
pa_atomic_t pid;
- uint64_t *_reserverd1;
- uint64_t *_reserverd2;
- uint64_t *_reserverd3;
- uint64_t *_reserverd4;
+ uint64_t _reserved1;
+ uint64_t _reserved2;
+ uint64_t _reserved3;
+ uint64_t _reserved4;
};
static char *segment_name(char *fn, size_t l, unsigned id) {
--
1.6.0.3

View File

@ -0,0 +1,40 @@
From 3bef1a94b4a757292f6077b9c93285f74210752f Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Sat, 1 Nov 2008 21:11:48 +0100
Subject: [PATCH] Make sure libpulse never gets unloaded
When an .so is unloaded during runtime all TLS keys it has registered
need to be freed because the destructor callbacks of the TLS key might
otherwise point to invalid code. Hence it would appear sensible to
destruct the TLS keys from a function marked as __attribute__
((destructor)). However functions marked like that are also called when
an application terminates, on exit(). If a thread continues to run until
the very exit it might still want to access that TLS data. The
destructor functions are called while all other threads are still
running. If __attribute ((destructor)) is used to destruct TLS keys for
such threads this might hence cause a crash when the application shuts
down.
To circumvent this problem we'll now compile libpulse with -z nodelete,
to make it unnecessary to delete the TLS data ever and thus avoiding the
problem. It's suboptimal, but for now I see no better solution.
---
src/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index f277198..a4e4944 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,7 +66,7 @@ AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
# Only required on some platforms but defined for all to avoid errors
-AM_LDFLAGS = -Wl,-no-undefined -Wl,--gc-sections
+AM_LDFLAGS = -Wl,-no-undefined -Wl,--gc-sections -Wl,-z,nodelete
if STATIC_BINS
BINLDFLAGS = -static
--
1.6.0.3

View File

@ -3,7 +3,7 @@
Name: pulseaudio
Summary: Improved Linux sound server
Version: 0.9.13
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
Group: System Environment/Daemons
Source0: http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-%{version}.tar.gz
@ -48,6 +48,8 @@ Patch19: 0019-don-t-set-the-volume-of-pacat-unless-it-is-explicitl.patch
Patch20: 0020-warn-if-ALSA-wakes-us-up-and-there-is-actually-nothi.patch
Patch21: 0021-fix-build.patch
Patch22: 0022-make-sure-to-use-64bit-rounding-even-on-32bit-machin.patch
Patch23: 0023-make-shm-marker-architecture-independant-patch-from.patch
Patch24: 0024-Make-sure-libpulse-never-gets-unloaded.patch
%description
PulseAudio is a sound server for Linux and other Unix like operating
@ -206,6 +208,8 @@ This package contains command line utilities for the PulseAudio sound server.
%patch20 -p1 -b .0020-warn-if-ALSA-wakes-us-up-and-there-is-actually-nothi.patch
%patch21 -p1 -b .0021-fix-build.patch
%patch22 -p1 -b .0022-make-sure-to-use-64bit-rounding-even-on-32bit-machin.patch
%patch23 -p1 -b .0023-make-shm-marker-architecture-independant-patch-from.patch
%patch24 -p1 -b .0024-Make-sure-libpulse-never-gets-unloaded.patch
%build
CFLAGS="-ggdb" %configure --disable-ltdl-install --disable-static --disable-rpath --with-system-user=pulse --with-system-group=pulse --with-realtime-group=pulse-rt --with-access-group=pulse-access
@ -437,6 +441,9 @@ groupadd -r pulse-access &>/dev/null || :
%{_mandir}/man1/pax11publish.1.gz
%changelog
* Sat Nov 1 2008 Lennart Poettering <lpoetter@redhat.com> 0.9.13-6
- Backport another two fixes from current git master
* Tue Oct 28 2008 Matthias Clasen <mclasen@redhat.com> 0.9.13-5
- Require new enough speex-devel